[SWEA] 11387 몬스터 사냥

김은서·2021년 9월 30일

Python code

T = int(input())
for tc in range(1, T+1):
    D, L, N = map(int, input().split())
    n = 0
    damage = 0
    for i in range(N):
        damage += D * (1 + i * L * 1/100)
    print('#{} {}'.format(tc, int(damage)))    
profile
Gracelog

0개의 댓글