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.
where is the answer? I’m beginner,and i want to reference a answer.
why the icon of “result”is grey that indicates i can’t hit it to see the answer？
yea, if your code changes in certain ways, the bombs move. makes it impossible to cheat basically.
Think about it this way:
if its below you, your at the max up, (+1)
if its above you, your at the max bottom (+1)
if it’s left of you, your max right (+1)
and if its right of you, your max left (+1)
then split the difference.
I believe you only get to see an answer once you solved the puzzle at 100% percent for the particular language.
So just found out this behaviour is not limited to python but int typecasting returns the value to rounding off to 0. so that’s the reason.
I thought the point was that we would get an input of the bomb direction which we could then use to help batman find the bomb?
Can someone please help?
Are you checking whether bombDir is equal to the letter U or equal to the value of a variable named U?
Hi All ! I’ve been having trouble with the last test ‘Not There’? My algo is too slow, and it will need one more turn to defuse it.
I can see it splitting the search space of the binary search properly, so I don’t know how to improve it.
Is there any trick for the last one or maybe a missed something on my code?
I don’t know why my code doesn’t work…
Any help please?^^
define “doesn’t work”. Do you have a runtime error? Does it timeout? Does Batman fail to reach the bomb in due time?
7 assignments for 7 test cases…