here is my code,
t=int(raw_input())
for i in range(t):
n1,n2=map(long,raw_input().split())
x=(n1**n2)%10
print (x)
but it is giving TLE, someone tell me how to fix it ??
created
last reply
- 1
reply
- 396
views
- 2
users
here is my code,
t=int(raw_input())
for i in range(t):
n1,n2=map(long,raw_input().split())
x=(n1**n2)%10
print (x)
but it is giving TLE, someone tell me how to fix it ??