Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 개발
- 자료구조
- 북리뷰
- Operating System
- vector
- Computer science
- c++
- DP
- 구현
- 알고리즘
- 너비우선탐색
- OS
- 오퍼레이팅시스템
- 정석학술정보관
- 백준
- 오에스
- 그래프
- Stack
- 브루트포스
- 코딩
- 코테
- cs
- 컴공
- coding
- bfs
- 컴퓨터공학과
- 정석
- 컴공과
- 문제풀이
- 스택
Archives
- Today
- Total
Little Jay
[C++] 백준 2657번 문자열 반복 본문
#include <iostream>
#include <string>
using namespace std;
int main() {
int testcase;
cin >> testcase;
for (int i = 0; i < testcase; i++) {
int repeat;
string s;
cin >> repeat >> s;
for (int k = 0; k < s.length(); k++) {
for (int j = 0; j < repeat; j++) {
cout << s[k];
}
}
cout << "\n";
}
return 0;
}
'알고리즘 > BOJ' 카테고리의 다른 글
[C++] 백준 10818번 최소, 최대 (0) | 2021.03.08 |
---|---|
[C++] 백준 8958번 OX퀴즈 (0) | 2021.03.08 |
[C++] 백준 2476번 주사위 (0) | 2021.03.06 |
[C++] 백준 1284번 집 주소 (0) | 2021.03.06 |
[C++] 백준 3052번 나머지 (0) | 2021.03.06 |
Comments