링크 : https://www.acmicpc.net/problem/11721
#include <iostream>
#include <string>
using namespace std;
int main() {
string s = "";
cin >> s;
int n = s.size() / 10 ;
if(n % 10 != 0) n++;
if(n == 0){
cout << s;
return 0;
}
int pre = 0;
int now = 10;
for(int i = 0; i < n; i++){
for(int j = pre; j < now; j++){
cout << s[j];
}
cout << "\n";
pre += 10;
now += 10;
if(now > s.size()) now = s.size();
}
return 0;
}