-
백준 11022번 A+B-8백준 algorithm 2020. 7. 8. 21:21반응형
https://www.acmicpc.net/problem/11022
11022번: A+B - 8
각 테스트 케이스마다 "Case #x: A + B = C" 형식으로 출력한다. x는 테스트 케이스 번호이고 1부터 시작하며, C는 A+B이다.
www.acmicpc.net
This file contains hidden or 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> #include <vector> using namespace std; int main(void) { int n = 0; cin >> n; vector<int> x(n); vector<int> y(n); for (int i = 0; i < n; i++) { cin >> x[i] >> y[i]; } for (int i = 0; i < n; i++) { cout << "Case #" << i + 1 << ": " << x[i] <<" + "<< y[i] <<" = "<< x[i]+ y[i]<< "\n"; } return 0; } 728x90'백준 algorithm' 카테고리의 다른 글
백준 2742번 기찍 N (0) 2020.07.08 백준 11021번 A+B-7 (0) 2020.07.08 백준 2438번 별 찍기-1 (0) 2020.07.08 백준 2439번 별 찍기 -2 (0) 2020.07.08 백준 10871번 X보다 작은 수 (0) 2020.07.08