QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#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)
详细
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'