(SW) Stack1 - 거듭 제곱

광어회깍뚝썰기·2021년 8월 12일
0

swea-intermediate

목록 보기
40/51
def calc(val,cnt):
    if cnt==1:
        return val
    return calc(N*val,cnt-1)


for tc in range(1,10+1):
    t = int(input())
    N,M = map(int,input().split())
    res= calc(N,M)
    
    print(f'#{t} {res}')

0개의 댓글

관련 채용 정보