Griffy is flying to Don Mills C.I. to make friends (after Glenforest's defeat in ECOO)! Griffy would like to fly at exactly
Input Specification
The first line will contain a single integer
The second line will contain a single integer
The next
Output Specification
Output one line, the number of plushies that Griffy will fly into.
Sample Input
Copy
5
3
1
7
5
Sample Output
Copy
2
Comments
weird school indeed
It was a weird problem.
Interestingly the last 4 cases returned
NumberFormatException
and further testing revealed null inputs for those cases, even though my program passed the sample input and the other cases. Test cases are written wrong, perhaps? Or do I have to consider null as a possible input and compensate for it?Not quite sure if this will solve it, but a byte can only handle values up to 128. The maximum output can be 200.
Changed to all shorts but still didn't work. I think it's the problem with the test cases.
There's still a
byte
keyword in your codeMy stupidity is my downfall... Forgot that byte only goes to 127... I'll leave this here so future people don't mess up at this point. And yup it works now. Thanks.
I agree, definitely a weird school.