Submission #223136

#TimeUsernameProblemLanguageResultExecution timeMemory
223136Haunted_CppSlon (COCI15_slon)Cpython 3
120 / 120
341 ms25716 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 = start + diff start %= m
#Verdict Execution timeMemoryGrader output
Fetching results...