QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#68482 | #5103. Fair Division | nocriz# | WA | 12ms | 8484kb | Python3 | 245b | 2022-12-16 20:14:46 | 2022-12-16 20:14:48 |
Judging History
answer
n, m = map(int, input().split())
qn = [1]
for i in range(2, 10000000):
v = pow(i, n)
if v - qn[-1] > m:
print("impossible")
quit()
for j, q in enumerate(qn):
if m % (v - q) == 0:
print(i-(j+1), i)
quit()
qn.append(v)
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 12ms
memory: 8484kb
input:
13 382475111752106101
output:
impossible
result:
wrong answer 1st lines differ - expected: '17 28', found: 'impossible'