From e56c7edb10a0443d42d75df8b282f47a2ff7ec99 Mon Sep 17 00:00:00 2001 From: JeonHaeIl Date: Tue, 25 Jul 2023 17:31:56 +0900 Subject: [PATCH 1/8] =?UTF-8?q?=EB=B6=84=EC=82=B0=EC=B2=98=EB=A6=AC=20/=20?= =?UTF-8?q?=EB=B8=8C=EB=A1=A0=EC=A6=88=202=20/=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Haeil/computer.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Haeil/computer.c diff --git a/Haeil/computer.c b/Haeil/computer.c new file mode 100644 index 0000000..fda8b26 --- /dev/null +++ b/Haeil/computer.c @@ -0,0 +1,18 @@ +#include +int main() { + int a, b, t, i, j, pc; + scanf("%d", &t); + for (i = 0; i < t; i++) { + pc = 1; + scanf("%d %d", &a, &b); + b %= 4; + if(b==0) + b = 4; + for (j = 1; j <= b; j++) { + pc = (pc * a) % 10; + } + if (pc == 0) + pc = 10; + printf("%d\n", pc); + } +} \ No newline at end of file From d9bef9d452dace2f544373908a6a9a0bcafb375f Mon Sep 17 00:00:00 2001 From: JeonHaeIl Date: Mon, 31 Jul 2023 19:51:12 +0900 Subject: [PATCH 2/8] =?UTF-8?q?=EC=83=88=20/=20=EB=B8=8C=EB=A1=A0=EC=A6=88?= =?UTF-8?q?=202=20/=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Haeil/1568.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Haeil/1568.c diff --git a/Haeil/1568.c b/Haeil/1568.c new file mode 100644 index 0000000..9ee6087 --- /dev/null +++ b/Haeil/1568.c @@ -0,0 +1,21 @@ +#include + +int main() { + int bird; + int num = 1; + int answer = 0; + printf(""); + scanf("%d", &bird); + while(bird > 0) { + bird -= num; + num += 1; + answer += 1; + if (num > bird) { + num = 1; + } + } + printf("%d\n", answer); + return 0; + + +} \ No newline at end of file From 9dd632257e53c20199ab7908179841fdcaa06c25 Mon Sep 17 00:00:00 2001 From: JeonHaeIl Date: Tue, 8 Aug 2023 00:56:52 +0900 Subject: [PATCH 3/8] =?UTF-8?q?=EC=83=81=EC=88=98=20/=20=EB=B8=8C=EB=A1=A0?= =?UTF-8?q?=EC=A6=882=20/=20O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Haeil/1568.c | 21 --------------------- "Haeil/6\354\243\274\354\260\250/2908.c" | 19 +++++++++++++++++++ Summer_C_study | 1 + 3 files changed, 20 insertions(+), 21 deletions(-) delete mode 100644 Haeil/1568.c create mode 100644 "Haeil/6\354\243\274\354\260\250/2908.c" create mode 160000 Summer_C_study diff --git a/Haeil/1568.c b/Haeil/1568.c deleted file mode 100644 index 9ee6087..0000000 --- a/Haeil/1568.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -int main() { - int bird; - int num = 1; - int answer = 0; - printf(""); - scanf("%d", &bird); - while(bird > 0) { - bird -= num; - num += 1; - answer += 1; - if (num > bird) { - num = 1; - } - } - printf("%d\n", answer); - return 0; - - -} \ No newline at end of file diff --git "a/Haeil/6\354\243\274\354\260\250/2908.c" "b/Haeil/6\354\243\274\354\260\250/2908.c" new file mode 100644 index 0000000..e2f46c0 --- /dev/null +++ "b/Haeil/6\354\243\274\354\260\250/2908.c" @@ -0,0 +1,19 @@ +#include + +int main() { + int num1; + int num2; + int answer; + printf(""); + scanf("%d", &num1, &num2); + num1 = ((num1%10) * 100 ) + (((num1 % 100)/10) * 10) + num1 / 100; + num2 = ((num2%10) * 100 ) + (((num2 % 100)/10) * 10) + num2 / 100; + if (num1 > num2) { + answer = num1; + } + else if (num1 < num2) { + answer = num2; + } + printf("%d", answer); + return 0; +} \ No newline at end of file diff --git a/Summer_C_study b/Summer_C_study new file mode 160000 index 0000000..ae1da18 --- /dev/null +++ b/Summer_C_study @@ -0,0 +1 @@ +Subproject commit ae1da18f1d078ee87a67e291cf1eac54d3dca774 From d4165b9212fd57dfe916eec14610d56e6c674409 Mon Sep 17 00:00:00 2001 From: JeonHaeIl Date: Tue, 8 Aug 2023 01:01:07 +0900 Subject: [PATCH 4/8] =?UTF-8?q?=EC=98=A4=EB=B8=90=20=EC=8B=9C=EA=B3=84=20/?= =?UTF-8?q?=20=EB=B8=8C=EB=A1=A0=EC=A6=883=20/=20O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Haeil/6\354\243\274\354\260\250/2525.c" | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 "Haeil/6\354\243\274\354\260\250/2525.c" diff --git "a/Haeil/6\354\243\274\354\260\250/2525.c" "b/Haeil/6\354\243\274\354\260\250/2525.c" new file mode 100644 index 0000000..9285a63 --- /dev/null +++ "b/Haeil/6\354\243\274\354\260\250/2525.c" @@ -0,0 +1,20 @@ +#include + +int main() { + int h; + int m; + int time; + printf(""); + scanf("%d %d", &h, &m); + printf(""); + scanf("%d", &time); + m += time; + h += m / 60; + m %= 60; + if (h >= 24) { + h -= 24; + + } + printf("%d %d", h , m); + return 0; +} \ No newline at end of file From 92857d1fe9caecb8e850b70110fff8872690b9da Mon Sep 17 00:00:00 2001 From: JeonHaeIl Date: Tue, 8 Aug 2023 01:02:21 +0900 Subject: [PATCH 5/8] =?UTF-8?q?=EA=B3=B1=EC=85=88=20/=20=EB=B8=8C=EB=A1=A0?= =?UTF-8?q?=EC=A6=883=20/=20O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Haeil/6\354\243\274\354\260\250/2588.c" | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 "Haeil/6\354\243\274\354\260\250/2588.c" diff --git "a/Haeil/6\354\243\274\354\260\250/2588.c" "b/Haeil/6\354\243\274\354\260\250/2588.c" new file mode 100644 index 0000000..c1a71df --- /dev/null +++ "b/Haeil/6\354\243\274\354\260\250/2588.c" @@ -0,0 +1,21 @@ +#include + +int main() { + int number1; + int number2; + int number2_1; + int number2_2; + int number2_3; + printf(""); + scanf("%d", &number1); + printf(""); + scanf("%d", &number2); + number2_1 = number2/100; + number2_2 = (number2/10) % 10; + number2_3 = (number2%100) %10; + printf("%d\n", number1 * number2_3); + printf("%d\n", number1 * number2_2); + printf("%d\n", number1 * number2_1); + printf("%d\n", number1 * number2); + return 0; +} \ No newline at end of file From c416cb4bc195fbf650f9c3e23884a4f33da2caad Mon Sep 17 00:00:00 2001 From: JeonHaeIl Date: Tue, 15 Aug 2023 00:03:43 +0900 Subject: [PATCH 6/8] =?UTF-8?q?=EC=A7=81=EA=B0=81=EC=82=BC=EA=B0=81?= =?UTF-8?q?=ED=98=95=20/=20=EB=B8=8C=EB=A1=A0=EC=A6=883=20/=20O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Haeil/7\354\243\274\354\260\250/4153.c" | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 "Haeil/7\354\243\274\354\260\250/4153.c" diff --git "a/Haeil/7\354\243\274\354\260\250/4153.c" "b/Haeil/7\354\243\274\354\260\250/4153.c" new file mode 100644 index 0000000..d9cda66 --- /dev/null +++ "b/Haeil/7\354\243\274\354\260\250/4153.c" @@ -0,0 +1,22 @@ +#include + +int main() { + int l; + int m; + int n; + while(1) { + printf(""); + scanf("%d %d %d", &l, &m, &n); + if (l == 0 && m == 0 && n == 0) { + break; + } + if (l*l + m*m == n*n || l*l + n*n == m*m || m*m + n*n == l*l) { + printf("right\n"); + } + else { + printf("wrong\n"); + } + } + return 0; + +} \ No newline at end of file From cd2d813bd5dd623c619f7d5a0745df9e64ac13bc Mon Sep 17 00:00:00 2001 From: JeonHaeIl Date: Tue, 15 Aug 2023 00:05:11 +0900 Subject: [PATCH 7/8] =?UTF-8?q?=EC=A3=BC=EC=82=AC=EC=9C=84=EA=B2=8C?= =?UTF-8?q?=EC=9E=84=20/=20=EB=B8=8C=EB=A1=A0=EC=A6=883=20/=20O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Haeil/7\354\243\274\354\260\250/10103.c" | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 "Haeil/7\354\243\274\354\260\250/10103.c" diff --git "a/Haeil/7\354\243\274\354\260\250/10103.c" "b/Haeil/7\354\243\274\354\260\250/10103.c" new file mode 100644 index 0000000..de4356a --- /dev/null +++ "b/Haeil/7\354\243\274\354\260\250/10103.c" @@ -0,0 +1,29 @@ +#include +void compare(int a, int b, int *chang_score, int *sang_score) { + if (a > b) { + *sang_score -= a; + } + if (a < b) { + *chang_score -= b; + } + +} + +int main() { + int chang_score = 100; + int sang_score = 100; + int num; + int chang_dice; + int sang_dice; + printf(""); + scanf("%d", &num); + for (int i = 0; i < num; i++) { + printf(""); + scanf("%d %d", &chang_dice, &sang_dice); + compare(chang_dice,sang_dice, &chang_score, &sang_score); + + } + printf("%d %d", chang_score, sang_score); + return 0; + +} \ No newline at end of file From a9e19360acd23ceea5ce51f6ce9155dc3a11d374 Mon Sep 17 00:00:00 2001 From: JeonHaeIl Date: Tue, 15 Aug 2023 00:06:21 +0900 Subject: [PATCH 8/8] =?UTF-8?q?=EB=83=89=EB=8F=99=EC=8B=9D=ED=92=88=20/=20?= =?UTF-8?q?=EB=B8=8C=EB=A1=A0=EC=A6=882=20/=20O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Haeil/7\354\243\274\354\260\250/14625.c" | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 "Haeil/7\354\243\274\354\260\250/14625.c" diff --git "a/Haeil/7\354\243\274\354\260\250/14625.c" "b/Haeil/7\354\243\274\354\260\250/14625.c" new file mode 100644 index 0000000..4d79c1a --- /dev/null +++ "b/Haeil/7\354\243\274\354\260\250/14625.c" @@ -0,0 +1,30 @@ +#include + +int main() { + int start_hour; + int start_min; + int end_hour; + int end_min; + int num; + int answer = 0; + printf(""); + scanf("%d %d", &start_hour, &start_min); + printf(""); + scanf("%d %d", &end_hour, &end_min); + printf(""); + scanf("%d", &num); + for (int i = start_hour; i <= end_hour; i++) { + for (int j = 0; j < 60; j++) { + if ((i == start_hour && j < start_min )||(i == end_hour && j > end_min)) { + continue; + } + if (i/10 == num || i%10 == num || j/10 == num || j%10 == num) { + answer += 1; + } + } + } + printf("%d", answer); + return 0; + + +} \ No newline at end of file