Skip to content

Commit 1347ceb

Browse files
committed
update README.md
1 parent 86c6c47 commit 1347ceb

File tree

4 files changed

+182
-0
lines changed

4 files changed

+182
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ Personal Solution of Algorithm Probs
1010
#### [2.사칙연산 도전하기](https://www.acmicpc.net/step/2)
1111
#### [3.for문 사용해보기](https://www.acmicpc.net/step/3)
1212
#### [4.if문 사용해보기](https://www.acmicpc.net/step/4)
13+
- [9498](https://www.acmicpc.net/problem/9498) : 시험 성적 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/9498.cpp)
14+
- [10817](https://www.acmicpc.net/problem/10817) : 세 수 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/10817.cpp)
15+
- [10871](https://www.acmicpc.net/problem/10871) : X보다 작은 수 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/10871.cpp)
16+
- [1546](https://www.acmicpc.net/problem/1546) : 평균 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/1546.cpp)
17+
- [4344](https://www.acmicpc.net/problem/4344) : 평균은 넘겠지 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/4344.cpp)
18+
- [1110](https://www.acmicpc.net/problem/1110) : 더하기 사이클 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/1110.cpp)
1319
#### [5.함수 사용하기](https://www.acmicpc.net/step/5)
20+
- [4673](https://www.acmicpc.net/problem/4673) : 셀프 넘버 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/4673.cpp)
21+
- [1065](https://www.acmicpc.net/problem/1065) : 한수 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/1065.cpp)
22+
- [2448](https://www.acmicpc.net/problem/2448) : 별 찍기 - 11 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/2448.cpp)
1423
#### [6.1차원 배열 사용하기](https://www.acmicpc.net/step/6)
1524
- [1152](https://www.acmicpc.net/problem/1152) : 단어의 개수 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/1152.cpp)
1625
- [2577](https://www.acmicpc.net/problem/2577) : 숫자의 개수 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/2577.cpp)

baekjoon/1065.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// Created by 융미 on 2019-04-28.
3+
//1065 한수
4+
#include <cstdio>
5+
6+
int main(){
7+
8+
int num;
9+
int han;
10+
11+
scanf("%d", &num);
12+
13+
if(num<100) han=num;
14+
else{
15+
han=99;
16+
for(int i = 100; i<=num; i++){
17+
18+
if(((i/100) - ((i%100)/10)) == (((i%100)/10)-((i%100)%10))){
19+
han++;
20+
}
21+
}
22+
}
23+
24+
printf("%d", han);
25+
return 0;
26+
}

baekjoon/2448.cpp

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
//
2+
// Created by 융미 on 2019-04-28.
3+
//2448 별 찍기 - 11
4+
#include <iostream>
5+
6+
char arr[3072][6144];
7+
8+
void star(int h, int x, int y) //입력은 삼각형의 높이, x, y좌표
9+
{
10+
//base case : 삼각형 높이가 3인 경우 삼각형 찍고 탈출
11+
if(h==3){
12+
arr[y][x] = '*';
13+
arr[y+1][x-1] = '*';
14+
arr[y+1][x+1] = '*';
15+
arr[y+2][x-2] = '*';
16+
arr[y+2][x-1] = '*';
17+
arr[y+2][x] = '*';
18+
arr[y+2][x+1] = '*';
19+
arr[y+2][x+2] = '*';
20+
return;
21+
}
22+
23+
//위 삼각형
24+
star(h/2, x, y);
25+
//왼쪽 삼각형
26+
star(h/2, x-(h/2), y+(h/2));
27+
//오른쪽 삼각형
28+
star(h/2, x+(h/2), y+(h/2));
29+
}
30+
31+
int main(){
32+
33+
int input = 0;
34+
std::cin>>input;
35+
36+
//배열 공백 초기화
37+
for(int i = 0; i<input; i++)
38+
{
39+
for(int j = 0; j < input*2 -1; j++){
40+
arr[i][j] = ' ';
41+
}
42+
}
43+
44+
star(input, input-1, 0);
45+
46+
for(int i = 0; i<input; i++)
47+
{
48+
for(int j = 0; j < input*2 -1; j++){
49+
std::cout << arr[i][j];
50+
}
51+
std::cout << '\n';
52+
}
53+
54+
return 0;
55+
}
56+
57+
////*2448 재귀 별찍기-C출력 버전
58+
//#include <cstdio>
59+
//
60+
//char arr[3072][6144];
61+
//
62+
//void star(int h, int x, int y) //입력은 삼각형의 높이, x, y좌표
63+
//{
64+
// //base case : 삼각형 높이가 3인 경우 삼각형 찍고 탈출
65+
// if(h==3){
66+
// arr[y][x] = '*';
67+
// arr[y+1][x-1] = '*';
68+
// arr[y+1][x+1] = '*';
69+
// arr[y+2][x-2] = '*';
70+
// arr[y+2][x-1] = '*';
71+
// arr[y+2][x] = '*';
72+
// arr[y+2][x+1] = '*';
73+
// arr[y+2][x+2] = '*';
74+
// return;
75+
// }
76+
//
77+
// //위 삼각형
78+
// star(h/2, x, y);
79+
// //왼쪽 삼각형
80+
// star(h/2, x-(h/2), y+(h/2));
81+
// //오른쪽 삼각형
82+
// star(h/2, x+(h/2), y+(h/2));
83+
//}
84+
//
85+
//int main(){
86+
//
87+
// int input = 0;
88+
// scanf("%d", &input);
89+
//
90+
// //배열 공백 초기화
91+
// for(int i = 0; i<input; i++)
92+
// {
93+
// for(int j = 0; j < input*2 -1; j++){
94+
// arr[i][j] = ' ';
95+
// }
96+
// }
97+
//
98+
// star(input, input-1, 0);
99+
//
100+
// for(int i = 0; i<input; i++)
101+
// {
102+
// for(int j = 0; j < input*2 -1; j++){
103+
// printf("%c", arr[i][j]);
104+
// }
105+
// printf("\n");
106+
// }
107+
//
108+
// return 0;
109+
//}
110+
111+
112+
113+
114+
115+

baekjoon/4673.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// Created by 융미 on 2019-04-28.
3+
//4673 셀프 넘버
4+
#include <cstdio>
5+
6+
int d(int num){
7+
int sum = num;
8+
while(num!=0)
9+
{
10+
sum += num%10;
11+
num = num/10;
12+
}
13+
return sum;
14+
}
15+
16+
int main()
17+
{
18+
bool arr[10001] = {false, };
19+
for (int i = 1; i<10001; i++)
20+
{
21+
int num = d(i);
22+
if(num<=10000){
23+
arr[num] = true;
24+
}
25+
}
26+
27+
for(int i = 1; i<10001; i++)
28+
{
29+
if(!arr[i]) printf("%d\n", i);
30+
}
31+
return 0;
32+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy