SWEA 1217. 거듭제곱
2024. 3. 7. 21:18ㆍ코딩 테스트/SWEA
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14dUIaAAUCFAYD
SW Expert Academy
SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!
swexpertacademy.com
전체 코드
# Code
def involution(n, m):
if m < 2:
return n
result = n * involution(n, m - 1)
return result
# ---- submit ----
T = 10
for test_case in range(1, T + 1):
t_num = int(input())
n, m = map(int, input().split(' '))
result = involution(n, m)
print(f'#{test_case} {result}')
'코딩 테스트 > SWEA' 카테고리의 다른 글
SWEA 13736. 사탕 분배 (1) | 2024.03.18 |
---|---|
SWEA 5215. 햄버거 다이어트 (0) | 2024.03.07 |
SWEA 2817. 부분 수열의 합 (0) | 2024.03.07 |
SWEA 1979. 어디에 단어가 들어갈 수 있을까? (0) | 2024.03.07 |
SWEA 2007. 패턴 마디의 길이 (0) | 2024.03.07 |