C++)
#include <iostream>
#include <string>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
string str;
cin >> str;
for (int i = 0; i < str.length(); i+=10) {
cout << str.substr(i, 10) << "\n";
}
return 0;
}
Python)
import sys
read = sys.stdin.readline
st = read().rstrip()
for i in range(0, len(st), 10):
print(st[i:i+10])
'백준 1 > 기초' 카테고리의 다른 글
| [백준 8958] OX 퀴즈 (C++/Python) (0) | 2020.12.05 |
|---|---|
| [백준 10818] 최소, 최대 (C++/Python) (0) | 2020.12.05 |
| [백준 11720] 숫자의 합 (C++/Python) (0) | 2020.12.05 |
| [백준 11719] 그대로 출력하기2 (C++/Python) (0) | 2020.12.05 |
| [백준 11718] 그대로 출력하기 (C++/Python) (0) | 2020.12.05 |