Skip to content

Commit f6c7fb2

Browse files
committed
update README.md
1 parent 8dce1ad commit f6c7fb2

File tree

9 files changed

+249
-0
lines changed

9 files changed

+249
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ Personal Solution of Algorithm Probs
1414
#### [6.1차원 배열 사용하기](https://www.acmicpc.net/step/6)
1515
#### [7.문자열 사용하기](https://www.acmicpc.net/step/7)
1616
#### [8.규칙 찾기](https://www.acmicpc.net/step/8)
17+
- [2438](https://www.acmicpc.net/problem/2438) : 별 찍기 - 1 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/2438.cpp)
18+
- [2292](https://www.acmicpc.net/problem/2292) : 벌집 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/2292.cpp)
19+
- [1193](https://www.acmicpc.net/problem/1193) : 분수찾기 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/1193.cpp)
20+
- [1011](https://www.acmicpc.net/problem/1011) : Fly me to the Alpha Centauri = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/1011.cpp)
21+
- [10250](https://www.acmicpc.net/problem/10250) : ACM 호텔 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/10250.cpp)
22+
- [1924](https://www.acmicpc.net/problem/1924) : 2007년 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/1924.cpp)
23+
- [2775](https://www.acmicpc.net/problem/2775) : 부녀회장이 될테야 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/2775.cpp)
24+
- [1475](https://www.acmicpc.net/problem/1475) : 방 번호 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/1475.cpp)
25+
- [6064](https://www.acmicpc.net/problem/6064) : 카잉달력 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/6064.cpp)
1726
#### [9.정렬해보기](https://www.acmicpc.net/step/9)
1827
- [2750](https://www.acmicpc.net/problem/2750) : 수 정렬하기 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/2750.cpp)
1928
- [2751](https://www.acmicpc.net/problem/2751) : 수 정렬하기 2 = [풀이](https://github.com/devOTTO/Algorithm-Study/blob/master/baekjoon/2751.cpp)

baekjoon/10250.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// Created by 융미 on 2019-04-26.
3+
//10250 ACM 호텔
4+
#include <cstdio>
5+
6+
int main(){
7+
int tc;
8+
int h, w, n;
9+
scanf("%d", &tc);
10+
while(tc--)
11+
{
12+
scanf("%d %d %d", &h, &w, &n);
13+
n--;
14+
int floor = n%h + 1;
15+
int num = n/h+1;
16+
17+
printf("%d\n", floor*100 + num);
18+
19+
}
20+
return 0;
21+
}

baekjoon/1193.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// Created by 융미 on 2019-04-26.
3+
//1193 분수찾기
4+
#include <cstdio>
5+
6+
int main()
7+
{
8+
int input = 0;
9+
scanf("%d", &input);
10+
int sum = 0;
11+
int count = 0;
12+
int up = 0;
13+
int down = 0;
14+
15+
while(input > sum)
16+
{
17+
sum += ++count;
18+
}
19+
20+
int k = input - (sum - count);
21+
22+
if(count%2)//
23+
{
24+
up = count - k + 1;
25+
down = k;
26+
}
27+
else{
28+
up = k;
29+
down = count - k + 1;
30+
}
31+
printf("%d/%d", up, down);
32+
return 0;
33+
}

baekjoon/1475.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// Created by 융미 on 2019-04-26.
3+
//1475 방 번호
4+
#include <cstdio>
5+
6+
int main()
7+
{
8+
int num;
9+
int arr[10] = {0, };
10+
scanf("%d", &num);
11+
if(num == 0)
12+
printf("%d", 1);
13+
else{
14+
while(num){
15+
arr[num%10]++;
16+
num/=10;
17+
}
18+
19+
int big = (arr[9] + arr[6] + 1)/2;
20+
21+
arr[6] = 0;
22+
23+
for(int i = 0; i<9; i++)
24+
{
25+
if(arr[i] > big)
26+
big = arr[i];
27+
}
28+
29+
printf("%d", big);
30+
}
31+
32+
return 0;
33+
}

baekjoon/1924.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// Created by 융미 on 2019-04-26.
3+
//1924 2007년
4+
#include <cstdio>
5+
int main(){
6+
7+
int month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30,31};
8+
char days[7][4] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
9+
10+
int x, y, count = 0;
11+
12+
scanf("%d %d", &x, &y);
13+
14+
for(int i = 0; i < x-1; i++)
15+
{
16+
count += month[i];
17+
}
18+
count += y;
19+
20+
printf("%s", days[count%7]);
21+
22+
return 0;
23+
}

baekjoon/2292.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// Created by 융미 on 2019-04-26.
3+
//2292 벌집
4+
#include <cstdio>
5+
6+
int main()
7+
{
8+
int input = 0;
9+
scanf("%d", &input);
10+
int sum = 1;
11+
int count = 1;
12+
while(input > sum)
13+
{
14+
sum += 6*(count++);
15+
}
16+
printf("%d", count);
17+
return 0;
18+
}

baekjoon/2438.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// Created by 융미 on 2019-04-27.
3+
//2438 별 찍기-1
4+
#include <cstdio>
5+
int main()
6+
{
7+
int a;
8+
scanf("%d", &a);
9+
10+
for(int i = 0; i<a; i++){
11+
for(int j = 0; j<=i; j++)
12+
{
13+
printf("*");
14+
}
15+
printf("\n");
16+
}
17+
return 0;
18+
}
19+

baekjoon/2775.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-26.
3+
//2775 부녀회장이 될테야
4+
#include <cstdio>
5+
6+
int bunyu(int k, int n);
7+
8+
int main(){
9+
int tc,k,n;
10+
11+
scanf("%d", &tc);
12+
13+
while(tc--)
14+
{
15+
scanf("%d", &k);
16+
scanf("%d", &n);
17+
18+
printf("%d\n", bunyu(k,n));
19+
}
20+
return 0;
21+
}
22+
23+
int bunyu(int k, int n)
24+
{
25+
if(n == 1) // base case 1호
26+
return 1;
27+
28+
if(k == 0) //base case 0층
29+
return n;
30+
31+
return bunyu(k, n-1) + bunyu(k-1,n);
32+
}

baekjoon/6064.cpp

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
//
2+
// Created by 융미 on 2019-04-26.
3+
//6064 카잉 달력
4+
#include <cstdio>
5+
6+
int gcd(int x, int y);
7+
8+
int main()
9+
{
10+
int tc, m,n,x,y, tempX, tempY;
11+
int lcm = 0;
12+
int count = 0;
13+
scanf("%d", &tc);
14+
15+
while(tc--){
16+
scanf("%d %d %d %d", &m, &n, &x, &y);
17+
18+
lcm = m*n/gcd(m,n);
19+
tempX = 1;
20+
tempY = 1;
21+
for(count = x; count<=lcm; count+=m)
22+
{
23+
tempX = (count-1)%m + 1;
24+
tempY = (count-1)%n + 1;
25+
26+
if(tempX == x && tempY == y)
27+
break;
28+
}
29+
if(count > lcm)
30+
count = -1;
31+
32+
printf("%d\n", count);
33+
34+
}
35+
36+
37+
38+
return 0;
39+
40+
}
41+
42+
int gcd(int x, int y)
43+
{
44+
if(x%y == 0) //base case
45+
return y;
46+
47+
return gcd(y, x%y);
48+
49+
}
50+
51+
52+
53+
54+
55+
56+
57+
58+
59+
60+
61+

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