Task: | Finding inverse |
Sender: | hungdojan |
Submission time: | 2024-11-16 10:21:16 +0200 |
Language: | Python3 (PyPy3) |
Status: | READY |
Result: | RUNTIME ERROR |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.04 s | details |
#2 | RUNTIME ERROR | 0.06 s | details |
#3 | ACCEPTED | 0.04 s | details |
#4 | ACCEPTED | 0.04 s | details |
#5 | RUNTIME ERROR | 0.06 s | details |
#6 | ACCEPTED | 0.04 s | details |
#7 | ACCEPTED | 0.04 s | details |
#8 | RUNTIME ERROR | 0.06 s | details |
#9 | ACCEPTED | 0.04 s | details |
#10 | ACCEPTED | 0.04 s | details |
#11 | RUNTIME ERROR | 0.06 s | details |
#12 | ACCEPTED | 0.04 s | details |
#13 | ACCEPTED | 0.04 s | details |
#14 | RUNTIME ERROR | 0.07 s | details |
Code
nums = [int(i) for i in input().split()] a, m = nums[0], nums[1] print(pow(a, -1, m))
Test details
Test 1
Verdict: ACCEPTED
input |
---|
6 7 |
correct output |
---|
6 |
user output |
---|
6 |
Test 2
Verdict: RUNTIME ERROR
input |
---|
0 7 |
correct output |
---|
-1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 4, in <module> print(pow(a, -1, m)) ValueError: base is not invertible for the given modulus
Test 3
Verdict: ACCEPTED
input |
---|
5 78 |
correct output |
---|
47 |
user output |
---|
47 |
Test 4
Verdict: ACCEPTED
input |
---|
89 99 |
correct output |
---|
89 |
user output |
---|
89 |
Test 5
Verdict: RUNTIME ERROR
input |
---|
0 61 |
correct output |
---|
-1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 4, in <module> print(pow(a, -1, m)) ValueError: base is not invertible for the given modulus
Test 6
Verdict: ACCEPTED
input |
---|
897 947 |
correct output |
---|
625 |
user output |
---|
625 |
Test 7
Verdict: ACCEPTED
input |
---|
419 538 |
correct output |
---|
217 |
user output |
---|
217 |
Test 8
Verdict: RUNTIME ERROR
input |
---|
32 938 |
correct output |
---|
-1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 4, in <module> print(pow(a, -1, m)) ValueError: base is not invertible for the given modulus
Test 9
Verdict: ACCEPTED
input |
---|
184120 505187 |
correct output |
---|
438779 |
user output |
---|
438779 |
Test 10
Verdict: ACCEPTED
input |
---|
264601 885661 |
correct output |
---|
360221 |
user output |
---|
360221 |
Test 11
Verdict: RUNTIME ERROR
input |
---|
40310 590135 |
correct output |
---|
-1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 4, in <module> print(pow(a, -1, m)) ValueError: base is not invertible for the given modulus
Test 12
Verdict: ACCEPTED
input |
---|
202254499 577081420 |
correct output |
---|
128866679 |
user output |
---|
128866679 |
Test 13
Verdict: ACCEPTED
input |
---|
539836073 888851205 |
correct output |
---|
797044652 |
user output |
---|
797044652 |
Test 14
Verdict: RUNTIME ERROR
input |
---|
697847215 756971670 |
correct output |
---|
-1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 4, in <module> print(pow(a, -1, m)) ValueError: base is not invertible for the given modulus