-
코드블럭 스킨 변경카테고리 없음 2020. 6. 28. 18:42
import sys input = sys.stdin.readline n = int(input()) for _ in range(n): a,b = map(int,input().split()) if a%10 == 0: print(10) break else: a = a%10 b = b%4 print((a**b)%10)
import sys
input = sys.stdin.readline
n = int(input())
for _ in range(n):
a,b = map(int,input().split())
if a%10 == 0:
print(10)
break
else:
a = a%10
b = b%4
print((a**b)%10)