# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
223137 | Haunted_Cpp | Slon (COCI15_slon) | Cpython 3 | 318 ms | 25452 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
n = str (input())
p, m = map (int, input().split())
a = eval(n.replace("x", str(1)))
b = eval(n.replace("x", str(2)))
start = eval(n.replace("x", str(0)))
diff = b - a
for i in range (1000000):
if (start == p) :
print(i)
break
start += diff
start %= m
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |