Skip to content

Commit c01ac1f

Browse files
Merge pull request encrypted-def#82 from wogha95/pirateturtle2445
Update 2445.cpp
2 parents 005ee74 + 2b2b2cc commit c01ac1f

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

0x02/solutions/2445.cpp

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
// Authored by : BaaaaaaaaaaarkingDog
1+
// Authored by : wogha95
22
// Co-authored by : -
3-
// http://boj.kr/****************
3+
// http://boj.kr/aee90111832742cb969736538c8f2d62
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 = 1; i <= N - 1; i++) {
15+
for(int j = 1; j <= i; j++) cout << '*';
16+
for(int j = 1; j <= 2 * (N - i); j++) cout << ' ';
17+
for(int j = 1; j <= i; j++) cout << '*';
18+
cout << "\n";
19+
}
20+
21+
for(int j = 1; j <= 2 * N; j++) cout << '*';
22+
cout << "\n";
23+
24+
for(int i = 1; i <= N - 1; i++) {
25+
for(int j = 1; j <= N - i; j++) cout << '*';
26+
for(int j = 1; j <= 2 * i; j++) cout << ' ';
27+
for(int j = 1; j <= N - i; j++) cout << '*';
28+
cout << "\n";
29+
}
1130
}

0x02/solutions/2446.cpp

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)