import math
n, k = map(int, input().split())
print('NO' if (math.floor(n/k) % 2 == 0) else 'YES')
The above code takes 2 integers n and k as input and tries to tell if is odd or even.
Now the test cases :
Input: n = 10 and k = 3 Output: YES Verdict: Correct.
Input: n = 1000 and k = 3 Output: YES Verdict: Correct.
Input: n = 10000000000000000 and k = 3 Output: YES Verdict: Correct.
Input: n = 100000000000000000 and k = 3 Output: NO Verdict: Wrong.
Input: n = 1000000000000000000 and k = 3 Output: NO Verdict: Wrong.
Now, what I found is that for n < 10e16 it works fine but for n = 10e17, 10e18, etc. it gives the wrong answer. I am not able to find an explanation for this behavior.
Thanks in advance.
Happy coding