This game is bugged in GoLang, the input failed to be scanned.
So i am a beginner in python and for calculating mid i’ve used typecasting to convert the float value to int, and I believe it automatically rounds off the float value to the integer value, which was weird.
Can anyone help me on this,
I’ve got a perfect score in python and I’ve calculated mid using the following method : return int((position + target) / 2), just returning typecasted int value and if I use round or not it doesn’t really matter.
Well, in php with the same logic round((($position + $target) / 2)) using rounding of values I’m getting all test cases right except on evasive. How does the calculation differs in both languages.
for each location iteration in both cases i am taking mid of the y and x axis and returning the mid value and setting the current value to the returned mid positions, also setting x,y max and min values to the new values.
I have used the similar logic,was failing in evasive,thing I used was if I am getting continuous UP,used -gt 3, then increase my difference value.
Reason :- Since we have limited number of moves available and getting continuous UP means we have navigate more towards top.