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.
Hey there,
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.
Hey guys I am using Javascript. I am very new to this and am trying to use āifā to check the direction of the bomb however everytime i input āif(bombDir === U)ā, for example, I get a reply saying U is undefined. I have also tried other methods but all keep boiling down to the same point that I have no input that I can use to head towards the bomb.
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?
Thanks
Hi,
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ā¦
Suspiciousā¦
U is a letter, you have to check it like if (bombDir === "U") {...}
Can someone give me advice, how to solve this puzzle correctly?
Wrote ābinary-searchā similar code, passed 5/7 tests, but after submit system writes, that I passed only 2 tests and the others are hard coded
For python, I used math.ceil() instead.
e.g.
math.ceil(0.5) --> 1
math.ceil(1.5) --> 2
Hi, Iām wrong. When I did condition avec if in language C for recognize the movement like (U,UR,L,D,Rā¦), my character move in the same way.I donāt understand why!!! Can you help me to get it?
if it moves the same way, it means your code doesnāt properly take into account the different inputs. You should check you correctly read and use the inputs, every turn.