-
[BOJ / C++] 26574번 : CopierStudy (etc)/Problem Solving 2022. 12. 20. 18:46
문제
Your copier broke down last week, and you need to copy a list of numbers for a class project due tomorrow! Luckily, you can use your computer to copy the numbers for you. Given a list of numbers, each on their own line, print out the number, a space, and then another copy of the number.
입력
The first line will contain a single integer n that indicates the number of numbers to follow, each on their own line. The next n lines will each contain a single number.
출력
For each of the n lines, print out the original number and a copy of the number, with one space of separation.
Solved.ac 레벨
브론즈 V
풀이
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; while(n--){ int input; cin >> input; cout << input << " " << input << "\n"; } return 0; }
26574번: Copier
Your copier broke down last week, and you need to copy a list of numbers for a class project due tomorrow! Luckily, you can use your computer to copy the numbers for you. Given a list of numbers, each on their own line, print out the number, a space, and t
www.acmicpc.net
'Study (etc) > Problem Solving' 카테고리의 다른 글
[BOJ / C++] 26307번 : Correct (0) 2022.12.21 [BOJ / C++] 26545번 : Mathematics (0) 2022.12.20 [BOJ / C++] 5341번 : Pyramids (0) 2022.12.17 [BOJ / C++] 20254번 : Site Score (0) 2022.12.15 [BOJ / Python3] 8437번 : Julka (0) 2022.12.13