-Code
from math import pi
for t in range(1, int(input()) + 1):
r, a, b = map(int, input().split())
res = 0
while r > 0:
res += pi * (r ** 2)
r *= a
res += pi * (r ** 2)
r //= b
print(f"Case #{t}: {res:.6f}")
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 30841번 Ложки (0) | 2024.12.21 |
---|---|
[백준/파이썬] 32500번 Dishonest Lottery (1) | 2024.12.20 |
[백준/파이썬] 32969번 학술대회 참가신청 (1) | 2024.12.18 |
[백준/파이썬] 32888번 Consolidating Windows (0) | 2024.12.17 |
[백준/파이썬] 10187번 Golden (0) | 2024.12.16 |