Recent Posts
Notice
No Rules Rules
별 찍기 - 1 (feat. 백준, 2438번) 본문
728x90
반응형
별 찍기 - 1
https://www.acmicpc.net/problem/2438
2438번: 별 찍기 - 1
첫째 줄에는 별 1개, 둘째 줄에는 별 2개, N번째 줄에는 별 N개를 찍는 문제
www.acmicpc.net
반응형
// woohyeon.kim
// kim519620.tistory.com
#include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(false), cin.tie(NULL);
register int N;
cin >> N;
for (register int n = 1, i; n <= N; ++n) {
for (i = 1; i <= n; ++i)
cout << "*";
cout << "\n";
}
return 0;
}
// *&)*@*
문제의 규칙에 맞게 '*'을 출력하는 문제입니다.
728x90
반응형
'생활 > 코테' 카테고리의 다른 글
X보다 작은 수 (feat. 백준, 10871번) (0) | 2022.08.10 |
---|---|
별 찍기 - 2 (feat. 백준, 2439번) (0) | 2022.08.10 |
A+B - 7 (feat. 백준, 11021번) (0) | 2022.08.10 |
빠른 A+B (feat. 백준, 15552번) (0) | 2022.08.10 |
영수증 (feat. 백준, 25304번) (0) | 2022.08.10 |
Comments