728x90
9295번: 주사위
각 테스트 케이스마다 "Case x: "를 출력한 다음, 주사위를 두 번 던져 나온 두 수의 합을 출력한다. 테스트 케이스 번호(x)는 1부터 시작한다.
www.acmicpc.net
문제 풀이
테스트케이스마다 주어지는 두 수의 합을 조건에 맞게 출력한다.
정답 코드
for i in range(1, int(input()) + 1) :
n, m = map(int, input().split())
print(f"Case {i}: {n + m}")
728x90
'Algorithm > PS' 카테고리의 다른 글
[BOJ/백준] 9298 - Ant Entrapment [python] (0) | 2023.03.24 |
---|---|
[BOJ/백준] 9297 - Reducing Improper Fractions [python] (0) | 2023.03.24 |
[BOJ/백준] 9288 - More Dice [python] (0) | 2023.03.24 |
[BOJ/백준] 9286 - Gradabase [python] (0) | 2023.03.24 |
[BOJ/백준] 9161 - Sir Bedavere’s Bogus Division Solutions [python] (0) | 2023.03.24 |