1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
 
using namespace std;
 
int main(int argc, char *argv[]) {
    int T, repeat;
    string s;
    
    cin >> T;
    getline(cin, s, '\n');
    
    for(int t_case=0; t_case<T; t_case++) {
        getline(cin, s, '\n');
        repeat = s.at(0- '0';
        for(int i=2; i<s.length(); i++)
            for(int j=0; j<repeat; j++)
                cout << s.at(i);
        
        cout << endl;
    }
}
cs


'C & C++ > Baekjoon' 카테고리의 다른 글

백준 2741 - N 찍기  (0) 2017.12.27
백준 2739 - 구구단  (0) 2017.12.27
백준 2577 - 숫자의 개수  (0) 2017.12.27
백준 2558 - A+B 2  (0) 2017.12.27
백준 2557 - Hello World  (0) 2017.12.27

+ Recent posts