Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3794714

Browse files
committed
Update 2446.cpp
1 parent 5fff342 commit 3794714

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

‎0x02/solutions/2446.cpp‎

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1-
// Authored by : BaaaaaaaaaaarkingDog
1+
// Authored by : wogha95
22
// Co-authored by : -
3-
// http://boj.kr/****************
3+
// http://boj.kr/7026df35c02346969ab865fd2c15ad16
44
#include <bits/stdc++.h>
55
using namespace std;
66

7-
int main(void){
7+
int main(void){
88
ios::sync_with_stdio(0);
99
cin.tie(0);
10-
10+
11+
int N;
12+
cin >> N;
13+
14+
for(int i = 0; i < N - 1; i++) {
15+
for(int j = 0; j < i; j++) cout << ' ';
16+
for(int j = 0; j < 2 * (N - i) - 1; j++) cout << '*';
17+
cout << "\n";
18+
}
19+
20+
for(int j = 0; j < N - 1; j++) cout << ' ';
21+
cout << "*\n";
22+
23+
for(int i = 1; i <= N - 1; i++) {
24+
for(int j = 1; j <= N - i - 1; j++) cout << ' ';
25+
for(int j = 1; j <= 2 * i + 1; j++) cout << '*';
26+
cout << "\n";
27+
}
1128
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /