Submission #223137

#TimeUsernameProblemLanguageResultExecution timeMemory
223137Haunted_CppSlon (COCI15_slon)Cpython 3
120 / 120
318 ms25452 KiB
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 timeMemoryGrader output
Fetching results...