[백준] 1009번 : 분산처리 - Python(파이썬)

강재원·2022년 10월 5일
0

[코딩테스트] Python

목록 보기
96/200



https://www.acmicpc.net/problem/1009

n=int(input())

for i in range(n):
    a,b=map(int,input().split())
    num=1
    for _ in range(b): num=(num*a)%10
    print(10 if(num==0) else num)
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글