20250517 baekjoon
This commit is contained in:
parent
e53b0c31bd
commit
55bec15510
10
code_study/Baekjoon/c/10950.c
Normal file
10
code_study/Baekjoon/c/10950.c
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int n, a, b;
|
||||||
|
scanf("%d",&n);
|
||||||
|
for(int i=0; i<n; i++){
|
||||||
|
scanf("%d %d",&a, &b);
|
||||||
|
printf("%d\n",a+b);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
6
code_study/Baekjoon/c/10951.c
Normal file
6
code_study/Baekjoon/c/10951.c
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int a,b;
|
||||||
|
while(scanf("%d %d",&a,&b) != EOF) printf("%d\n",a+b);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
11
code_study/Baekjoon/c/10952.c
Normal file
11
code_study/Baekjoon/c/10952.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int a,b;
|
||||||
|
|
||||||
|
while(1){
|
||||||
|
scanf("%d %d",&a,&b);
|
||||||
|
if(a==b&&a==0) break;
|
||||||
|
printf("%d\n",a+b);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
10
code_study/Baekjoon/c/11021.c
Normal file
10
code_study/Baekjoon/c/11021.c
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int n, a, b;
|
||||||
|
scanf("%d",&n);
|
||||||
|
for(int i=1; i<=n; i++){
|
||||||
|
scanf("%d %d",&a, &b);
|
||||||
|
printf("Case #%d: %d\n",i,a+b);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
10
code_study/Baekjoon/c/11022.c
Normal file
10
code_study/Baekjoon/c/11022.c
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int n, a, b;
|
||||||
|
scanf("%d",&n);
|
||||||
|
for(int i=1; i<=n; i++){
|
||||||
|
scanf("%d %d",&a, &b);
|
||||||
|
printf("Case #%d: %d + %d = %d\n",i,a,b,a+b);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
11
code_study/Baekjoon/c/15552.c
Normal file
11
code_study/Baekjoon/c/15552.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int t, a, b;
|
||||||
|
scanf("%d",&t);
|
||||||
|
for(int i=0; i<t; i++){
|
||||||
|
scanf("%d %d",&a, &b);
|
||||||
|
printf("%d\n",a+b);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
13
code_study/Baekjoon/c/2438.c
Normal file
13
code_study/Baekjoon/c/2438.c
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int n;
|
||||||
|
scanf("%d",&n);
|
||||||
|
|
||||||
|
for(int i=1; i<=n; i++){
|
||||||
|
for(int j=0; j<i; j++){
|
||||||
|
printf("*");
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
12
code_study/Baekjoon/c/2439.c
Normal file
12
code_study/Baekjoon/c/2439.c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int n;
|
||||||
|
scanf("%d",&n);
|
||||||
|
|
||||||
|
for(int i=1; i<=n; i++){
|
||||||
|
for(int j=0; j<n-i; j++) printf(" ");
|
||||||
|
for(int k=0; k<i; k++) printf("*");
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
12
code_study/Baekjoon/c/25304.c
Normal file
12
code_study/Baekjoon/c/25304.c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int x,n,a,b;
|
||||||
|
int s=0;
|
||||||
|
scanf("%d\n%d",&x,&n);
|
||||||
|
for(int i=0;i<n;i++){
|
||||||
|
scanf("%d %d",&a,&b);
|
||||||
|
s += a*b;
|
||||||
|
}
|
||||||
|
printf("%s",(s==x)?"Yes":"No");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
7
code_study/Baekjoon/c/25314.c
Normal file
7
code_study/Baekjoon/c/25314.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int n;
|
||||||
|
scanf("%d",&n);
|
||||||
|
for(int i=0; i<(n/4); i++) printf("%s","long ");
|
||||||
|
printf("%s","int");
|
||||||
|
}
|
||||||
7
code_study/Baekjoon/c/2739.c
Normal file
7
code_study/Baekjoon/c/2739.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int n;
|
||||||
|
scanf("%d",&n);
|
||||||
|
for(int i=1; i<=9; i++) printf("%d * %d = %d\n",n,i,n*i);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
7
code_study/Baekjoon/c/8393.c
Normal file
7
code_study/Baekjoon/c/8393.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int main(){
|
||||||
|
int n;
|
||||||
|
scanf("%d",&n);
|
||||||
|
printf("%d",n*(n+1)/2);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user