From 72053ded46103aba641ebf6ac5166afdfb54cfd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=A1=EC=98=88=EC=B0=AC?= Date: Fri, 9 May 2025 23:29:05 +0900 Subject: [PATCH] 20250509 baekjoon --- Baekjoon/c/1330.c | 12 ++++++++++++ Baekjoon/c/14681.c | 11 +++++++++++ Baekjoon/c/2480.c | 10 ++++++++++ Baekjoon/c/2525.c | 9 +++++++++ Baekjoon/c/2753.c | 7 +++++++ Baekjoon/c/2884.c | 12 ++++++++++++ Baekjoon/c/9498.c | 7 +++++++ 7 files changed, 68 insertions(+) create mode 100644 Baekjoon/c/1330.c create mode 100644 Baekjoon/c/14681.c create mode 100644 Baekjoon/c/2480.c create mode 100644 Baekjoon/c/2525.c create mode 100644 Baekjoon/c/2753.c create mode 100644 Baekjoon/c/2884.c create mode 100644 Baekjoon/c/9498.c diff --git a/Baekjoon/c/1330.c b/Baekjoon/c/1330.c new file mode 100644 index 0000000..09f0efc --- /dev/null +++ b/Baekjoon/c/1330.c @@ -0,0 +1,12 @@ +# include + +int main() { + int a, b; + scanf("%d %d",&a, &b); + /*if (a>b) printf(">"); + else if (a==b) printf("=="); + else printf("<");*/ + puts(a-b?a>b?">":"<":"=="); + + return 0; +} \ No newline at end of file diff --git a/Baekjoon/c/14681.c b/Baekjoon/c/14681.c new file mode 100644 index 0000000..471250d --- /dev/null +++ b/Baekjoon/c/14681.c @@ -0,0 +1,11 @@ +#include +int main() { + int x,y; + int a[2][2] = { + {1,4}, + {2,3} + }; + scanf("%d %d",&x, &y); + printf("%d",a[x<0][y<0]); + return 0; +} \ No newline at end of file diff --git a/Baekjoon/c/2480.c b/Baekjoon/c/2480.c new file mode 100644 index 0000000..2950689 --- /dev/null +++ b/Baekjoon/c/2480.c @@ -0,0 +1,10 @@ +#include +int main() { + int a, b, c, max; + scanf("%d %d %d",&a,&b,&c); + max = a; + if (b>max) max=b; + if (c>max) max=c; + printf("%d",((a==b)&&(b==c)) ? a*1000+10000 : (a==b||a==c) ? a*100+1000 : (b==c) ? b*100+1000 : max*100); + return 0; +} \ No newline at end of file diff --git a/Baekjoon/c/2525.c b/Baekjoon/c/2525.c new file mode 100644 index 0000000..5435f2b --- /dev/null +++ b/Baekjoon/c/2525.c @@ -0,0 +1,9 @@ +# include +int main() { + int h, m, d, t; + scanf("%d %d",&h, &m); + scanf("%d",&d); + t = 60*h+m+d; + printf("%d %d",t/60%24,t%60); + return 0; +} \ No newline at end of file diff --git a/Baekjoon/c/2753.c b/Baekjoon/c/2753.c new file mode 100644 index 0000000..efd6609 --- /dev/null +++ b/Baekjoon/c/2753.c @@ -0,0 +1,7 @@ +#include +int main() { + int n; + scanf("%d",&n); + printf(!(n%400)||(!(n%4)&&(n%100))?"1":"0"); + return 0; +} \ No newline at end of file diff --git a/Baekjoon/c/2884.c b/Baekjoon/c/2884.c new file mode 100644 index 0000000..38f08e9 --- /dev/null +++ b/Baekjoon/c/2884.c @@ -0,0 +1,12 @@ +#include +int main() { + int h, m, t; + scanf("%d %d",&h, &m); + t = 60*h+m-45; + // if (t<0) printf("23 %d",60+t); + // else if (t==0) printf("0 0"); + // else printf("%d %d",t/60,t%60); + if (t<0) t += 1440; + printf("%d %d",(t/60+24)%24,(t%60+60)%60); + return 0; +} \ No newline at end of file diff --git a/Baekjoon/c/9498.c b/Baekjoon/c/9498.c new file mode 100644 index 0000000..28f4b7d --- /dev/null +++ b/Baekjoon/c/9498.c @@ -0,0 +1,7 @@ +#include +int main() { + int n; + scanf("%d",&n); + puts(n>89?"A":n>79?"B":n>69?"C":n>59?"D":"F"); + return 0; +} \ No newline at end of file