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 |
Tags
- Zynq
- 정보처리기사
- AMBA BUS
- SQL
- hdl
- amba
- 백준
- UNIX
- baekjoon
- linux
- 자격증
- verilog
- 정처기
- vitis
- Vivado
- chip2chip
- 리눅스
- Xilinx
- java
- 코딩테스트
- Bus
- Beakjoon
- HDLBits
- FPGA
- 실기
- verilog HDL
- Backjoon
- C++
- axi
- boj
Archives
- Today
- Total
Hueestory
[2675] 문자열 반복 (C++) 본문
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, r;
cin >> n;
string str;
for (int i = 0; i < n; i++) {
cin >> r >> str;
for (int j = 0; j < str.size(); j++)
{
for (int k = 0; k < r; k++)
cout << str[j];
}
cout << endl;
}
return 0;
}
1. n번의 반복 테스트 케이스를 받음
2. r번의 반복 횟수를 받고 str에 문자열 받음

'PS(중단) > BOJ' 카테고리의 다른 글
[2741] N 찍기 (C++) (0) | 2024.04.25 |
---|---|
[2739] 구구단 (C++) (0) | 2024.04.25 |
[2577] 숫자의 개수 (C++) (0) | 2024.04.25 |
[2562] 최댓값 (C++) (0) | 2024.04.25 |
[2557] Hello World (C++) (0) | 2024.04.25 |
Comments