문제 링크입니다: https://www.acmicpc.net/problem/9295
9295번: 주사위
각 테스트 케이스마다 "Case x: "를 출력한 다음, 주사위를 두 번 던져 나온 두 수의 합을 출력한다. 테스트 케이스 번호(x)는 1부터 시작한다.
www.acmicpc.net
간단한 구현 문제였습니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(void) | |
{ | |
int T; | |
cin >> T; | |
for (int t = 1; t <= T; t++) | |
{ | |
int a, b; | |
cin >> a >> b; | |
printf("Case %d: %d\n", t, a + b); | |
} | |
return 0; | |
} |


개발환경:Visual Studio 2017
지적, 조언, 질문 환영입니다! 댓글 남겨주세요~
반응형
'알고리즘 > BOJ' 카테고리의 다른 글
백준 9298번 Ant Entrapment (0) | 2021.07.04 |
---|---|
백준 9297번 Reducing Improper Fractions (0) | 2021.07.04 |
백준 9288번 More Dice (0) | 2021.07.04 |
백준 9286번 Gradabase (0) | 2021.07.03 |
백준 9228번 Check Digits (0) | 2021.07.02 |