Submission details
Task:Exponentiation
Sender:Abduvohid
Submission time:2025-11-14 02:04:56 +0200
Language:Python3 (PyPy3)
Status:READY
Result:
Test results
testverdicttime
#10.12 sdetails
#2ACCEPTED0.78 sdetails
#3ACCEPTED0.82 sdetails

Code

n = int(input())
MOD = 10** 9 + 7


for _ in range(n):
    a, b = map(int, input().split())

    if a == 0 or b == 0:
        print(1)
    else:
        print(pow(a, b, MOD))

Test details

Test 1

Verdict:

input
10201
0 0
0 1
0 2
0 3
...

correct output
1
0
0
0
0
...

user output
1
1
1
1
1
...
Truncated

Feedback: Incorrect character on line 2 col 1: expected "0", got "1"

Test 2

Verdict: ACCEPTED

input
200000
129612095 411099530
241615980 487174929
60862511 511830781
758816482 982657640
...

correct output
276067146
838400234
148093882
546897305
467086232
...

user output
276067146
838400234
148093882
546897305
467086232
...
Truncated

Test 3

Verdict: ACCEPTED

input
200000
692427692 536870911
252480658 536870911
505090334 536870911
27194853 536870911
...

correct output
940305728
707431813
917260341
908974199
375947818
...

user output
940305728
707431813
917260341
908974199
375947818
...
Truncated