Coding Test - cpp/String
[백준 11721: 열 개씩 끊어 출력하기] - C++
에드윈H
2021. 3. 25. 18:10
#pragma once
#include <iostream>
#include <string>
using namespace std;
int main() {
string n;
cin >> n;
int cnt = 1;
for (int i = 0; i < n.size(); i++)
{
if (cnt % 11 != 0)
{
cout << n[i];
}
else {
cout << "\n";
cnt = 0;
i--;
}
cnt++;
}
return 0;
}//end of main