From 00d5b5410ec61b9a58c767256d2ca1fd16743f0e Mon Sep 17 00:00:00 2001 From: sssssoyoung Date: Tue, 25 Jul 2023 17:46:56 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=EB=B6=84=EC=82=B0=EC=B2=98=EB=A6=AC\?= =?UTF-8?q?=EB=B8=8C=EB=A1=A0=EC=A6=882\X?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Soyoung/C_study.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Soyoung/C_study.c diff --git a/Soyoung/C_study.c b/Soyoung/C_study.c new file mode 100644 index 0000000..9d12d8a --- /dev/null +++ b/Soyoung/C_study.c @@ -0,0 +1,20 @@ +#include + +int main() { + int T; + scanf("%d", &T); + for(int t=0; t Date: Tue, 1 Aug 2023 13:40:17 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A6=AC=EC=96=BC\?= =?UTF-8?q?=EB=B8=8C=EB=A1=A0=EC=A6=885\O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Soyoung/5-1.c | 0 Soyoung/5-2.c | 0 Soyoung/5-3.c | 0 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Soyoung/5-1.c create mode 100644 Soyoung/5-2.c create mode 100644 Soyoung/5-3.c diff --git a/Soyoung/5-1.c b/Soyoung/5-1.c new file mode 100644 index 0000000..e69de29 diff --git a/Soyoung/5-2.c b/Soyoung/5-2.c new file mode 100644 index 0000000..e69de29 diff --git a/Soyoung/5-3.c b/Soyoung/5-3.c new file mode 100644 index 0000000..e69de29 From dc3fe47d99aedfbc1446c2bd0fae57aba2c7ea53 Mon Sep 17 00:00:00 2001 From: sssssoyoung Date: Tue, 1 Aug 2023 13:49:57 +0900 Subject: [PATCH 3/6] =?UTF-8?q?5=EC=A3=BC=EC=B0=A8\=EB=B8=8C=EB=A1=A0?= =?UTF-8?q?=EC=A6=885,=EB=B8=8C=EB=A1=A0=EC=A6=884,=EB=B8=8C=EB=A1=A0?= =?UTF-8?q?=EC=A6=885\OOX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Soyoung/5-1.c | 17 +++++++++++++++++ Soyoung/5-2.c | 14 ++++++++++++++ Soyoung/5-3.c | 17 +++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/Soyoung/5-1.c b/Soyoung/5-1.c index e69de29..7e816aa 100644 --- a/Soyoung/5-1.c +++ b/Soyoung/5-1.c @@ -0,0 +1,17 @@ +#include + +int factorial(int n) { + if( n==0 || n== 1 ) { + return 1; + } + else { + return n * factorial(n-1); + } +} + +int main() { + int N; + scanf("%d", &N); + printf("%d", factorial(N)); + return 0; +} \ No newline at end of file diff --git a/Soyoung/5-2.c b/Soyoung/5-2.c index e69de29..fd7fcf5 100644 --- a/Soyoung/5-2.c +++ b/Soyoung/5-2.c @@ -0,0 +1,14 @@ +#include + +char i_letter(char *S, int i) { + return S[i-1]; +} + +int main() { + char S[1000]; + scanf("%s", S); + int i; + scanf("%d", &i); + printf("%c", i_letter(S, i)); + return 0; +} \ No newline at end of file diff --git a/Soyoung/5-3.c b/Soyoung/5-3.c index e69de29..260462e 100644 --- a/Soyoung/5-3.c +++ b/Soyoung/5-3.c @@ -0,0 +1,17 @@ +#include + +int main() { + int T; + scanf("%d", &T); + for(int i=0;i Date: Tue, 15 Aug 2023 05:16:08 +0900 Subject: [PATCH 4/6] =?UTF-8?q?7=EC=A3=BC=EC=B0=A8\=EB=B8=8C=EB=A1=A0?= =?UTF-8?q?=EC=A6=883\O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Soyoung/7-1.c | 23 +++++++++++++++++++++++ Soyoung/7-2.c | 21 +++++++++++++++++++++ Soyoung/7-3.c | 24 ++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 Soyoung/7-1.c create mode 100644 Soyoung/7-2.c create mode 100644 Soyoung/7-3.c diff --git a/Soyoung/7-1.c b/Soyoung/7-1.c new file mode 100644 index 0000000..ed8f7b0 --- /dev/null +++ b/Soyoung/7-1.c @@ -0,0 +1,23 @@ +#include + +int main() { + int N; + scanf("%d", &N); + + int min = 1000000; + int max = -1000000; + + for (int i = 0; i < N; i++) { + int num; + scanf("%d", &num); + + if (num < min) { + min = num; + } + if (num > max) { + max = num; + } + } + printf("%d %d\n", min, max); + return 0; +} \ No newline at end of file diff --git a/Soyoung/7-2.c b/Soyoung/7-2.c new file mode 100644 index 0000000..ea8de6d --- /dev/null +++ b/Soyoung/7-2.c @@ -0,0 +1,21 @@ +#include + +int main() { + while (1) { + int a, b; + scanf("%d %d", &a, &b); + + if (a == 0 && b == 0) { + break; + } + if (b % a == 0) { + printf("factor\n"); + } else if (a % b == 0) { + printf("multiple\n"); + } else { + printf("neither\n"); + } + } + + return 0; +} diff --git a/Soyoung/7-3.c b/Soyoung/7-3.c new file mode 100644 index 0000000..e8f7353 --- /dev/null +++ b/Soyoung/7-3.c @@ -0,0 +1,24 @@ +#include + +int main() { + while(1) { + int a, b, c; + scanf("%d %d %d", &a, &b, &c); + + a *= a; + b *= b; + c *= c; + + if(a == 0 && b == 0 && c == 0) { + break; + } + else if(((a + b) == c) || ((a + c) == b) || ((c + b) == a)) { //문제에서 c가 제일 큰 변이라는 보장이 없음 + printf("right\n"); + } + else { + printf("wrong\n"); + } + + } + return 0; +} From e4ac34940ff77ed6b5ceaf55abaeaf10c869bd30 Mon Sep 17 00:00:00 2001 From: sssssoyoung Date: Tue, 15 Aug 2023 05:23:11 +0900 Subject: [PATCH 5/6] =?UTF-8?q?7=EC=A3=BC=EC=B0=A8\=EB=B8=8C=EB=A1=A0?= =?UTF-8?q?=EC=A6=883\O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Soyoung/Summer_C_study | 1 + 1 file changed, 1 insertion(+) create mode 160000 Soyoung/Summer_C_study diff --git a/Soyoung/Summer_C_study b/Soyoung/Summer_C_study new file mode 160000 index 0000000..3d186fb --- /dev/null +++ b/Soyoung/Summer_C_study @@ -0,0 +1 @@ +Subproject commit 3d186fb78441d64674f870dc6afb3d79243b8ceb From 42149b1474666458b8056f3a7a5ad0fba2510f32 Mon Sep 17 00:00:00 2001 From: sssssoyoung Date: Tue, 15 Aug 2023 05:27:30 +0900 Subject: [PATCH 6/6] =?UTF-8?q?7=EC=A3=BC=EC=B0=A8\=EB=B8=8C=EB=A1=A0?= =?UTF-8?q?=EC=A6=883\O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Soyoung/{7-1.c => 7_1.c} | 0 Soyoung/{7-2.c => 7_2.c} | 0 Soyoung/{7-3.c => 7_3.c} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename Soyoung/{7-1.c => 7_1.c} (100%) rename Soyoung/{7-2.c => 7_2.c} (100%) rename Soyoung/{7-3.c => 7_3.c} (100%) diff --git a/Soyoung/7-1.c b/Soyoung/7_1.c similarity index 100% rename from Soyoung/7-1.c rename to Soyoung/7_1.c diff --git a/Soyoung/7-2.c b/Soyoung/7_2.c similarity index 100% rename from Soyoung/7-2.c rename to Soyoung/7_2.c diff --git a/Soyoung/7-3.c b/Soyoung/7_3.c similarity index 100% rename from Soyoung/7-3.c rename to Soyoung/7_3.c