-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
340 changed files
with
17,760 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
printf("Hello Da_min,\nHello Er_min,\nHello Xiao_ming!\n"); | ||
return 0; | ||
} | ||
/************************************************************** | ||
Problem: 1001 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:744 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include<stdio.h> | ||
#include<math.h> | ||
int main() | ||
{ | ||
int x,y; | ||
scanf("x = %d, y = %d",&x,&y); | ||
printf("x + y : %d\nx - y : %d\nx * y : %d\nx / y quotient: %d, remainder: %d\nx ^ 2 : %.0lf\ny ^ 3 : %.0lf",x+y,x-y,x*y,x/y,x%y,pow(x,2),pow(y,3)); | ||
|
||
} | ||
/************************************************************** | ||
Problem: 1002 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:760 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
double r,s,c; | ||
scanf("%lf",&r); | ||
s=r*r*3.14; | ||
c=2*r*3.14; | ||
|
||
printf("Area: %lf\nPerimeter: %lf",s,c); | ||
|
||
} | ||
/************************************************************** | ||
Problem: 1003 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int a,b,c; | ||
double p; | ||
scanf("%d%d%d",&a,&b,&c); | ||
p=(a+b+c)/3.0; | ||
printf("%.3lf",p); | ||
} | ||
/************************************************************** | ||
Problem: 1004 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
char a,b,c; | ||
scanf("%c%c%c",&a,&b,&c); | ||
printf("%03d %03o %03x\n",a,a,a); | ||
printf("%03d %03o %03x\n",b,b,b); | ||
printf("%03d %03o %03x\n",c,c,c); | ||
} | ||
|
||
/************************************************************** | ||
Problem: 1006 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int a; | ||
scanf("%d",&a); | ||
(a%2==0)?printf("even"):printf("odd"); | ||
} | ||
/************************************************************** | ||
Problem: 1007 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include<stdio.h> | ||
#include<math.h> | ||
#include<stdlib.h> | ||
int main() | ||
{ | ||
int a; | ||
double b; | ||
scanf("%d%lf",&a,&b); | ||
printf("%d\n",abs(a)); | ||
printf("%g",fabs(b)); | ||
} | ||
/************************************************************** | ||
Problem: 1008 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int a; | ||
scanf("%d",&a); | ||
if((a%4==0)&&(a%100!=0)||(a%400==0))printf("Yes"); | ||
else printf("No"); | ||
} | ||
/************************************************************** | ||
Problem: 1010 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include<stdio.h> | ||
#include<math.h> | ||
int main() | ||
{ | ||
int m,a,b,c; | ||
scanf("%d",&m); | ||
a=m/100; | ||
b=m%100/10; | ||
c=m%10; | ||
if(m==pow(a,3)+pow(b,3)+pow(c,3))printf("YES"); | ||
else printf("NO"); | ||
} | ||
/************************************************************** | ||
Problem: 1012 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:760 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int a,b,c,d,e,f; | ||
scanf("%d",&a); | ||
b=100-a; | ||
c=b/20; | ||
d=(b%20)/10; | ||
e=(b%10)/5; | ||
f=b%5; | ||
printf("$20 bills: %d\n",c); | ||
printf("$10 bills: %d\n",d); | ||
printf(" $5 bills: %d\n",e); | ||
printf(" $1 bills: %d",f); | ||
} | ||
/************************************************************** | ||
Problem: 1013 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int a,b,c; | ||
scanf("(0%d)%d-%d",&a,&b,&c); | ||
printf("0086%d%d%d",a,b,c); | ||
} | ||
/************************************************************** | ||
Problem: 1014 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include<stdio.h> | ||
#include<math.h> | ||
#include<stdlib.h> | ||
int main() | ||
{ | ||
unsigned long long int n,sum=0,i; | ||
scanf("%llu",&n); | ||
if(n%2==0) | ||
sum=n/2*(n+1); | ||
if(n%2!=0) | ||
sum=(n+1)/2*n; | ||
printf("%llu",sum); | ||
|
||
} | ||
/************************************************************** | ||
Problem: 1015 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include<stdio.h> | ||
#include<math.h> | ||
int main() | ||
{ | ||
double x,y; | ||
scanf("%lf",&x); | ||
y=log(x)/log(2); | ||
printf("%d",(int)y); | ||
} | ||
/************************************************************** | ||
Problem: 1016 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:756 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int a,b,c,d,f; | ||
scanf("%d%d%d",&a,&b,&c); | ||
if((a<=100)&&(a>=0)&&(b<=100)&&(b>=0)&&(c<=100)&&(c>=0)) | ||
{ | ||
|
||
|
||
if(a>b) | ||
{ | ||
f=a; | ||
a=b; | ||
b=f; | ||
} | ||
if(a>c) | ||
{ | ||
f=a; | ||
a=c; | ||
c=f; | ||
} | ||
if(b>c) | ||
{ | ||
f=b; | ||
b=c; | ||
c=f; | ||
} | ||
printf("%d %d %d",a,b,c); | ||
} | ||
else ; | ||
} | ||
/************************************************************** | ||
Problem: 1018 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int k,m,n,i; | ||
scanf("%d%d%d",&k,&m,&n); | ||
if(m!=n) | ||
{ | ||
if(m>n) | ||
i=n; | ||
else i=m; | ||
printf("%d",i); | ||
i++; | ||
while(i<=k) | ||
{ | ||
if((i%m==0)&&(i%n!=0)||(i%n==0)&&(i%m!=0)) | ||
printf(" %d",i); | ||
i++; | ||
} | ||
} | ||
} | ||
/************************************************************** | ||
Problem: 1019 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int a,b; | ||
while(scanf("%d%d",&a,&b)!=EOF) | ||
printf("%d\n",a+b); | ||
} | ||
/************************************************************** | ||
Problem: 1020 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int n,a,b,i=1; | ||
scanf("%d",&n); | ||
while(i<=n) | ||
{ | ||
scanf("%d%d",&a,&b); | ||
printf("%d\n",a+b); | ||
i++; | ||
} | ||
} | ||
/************************************************************** | ||
Problem: 1021 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int a,b; | ||
while(1) | ||
{ | ||
scanf("%d%d",&a,&b); | ||
if(a==0&&b==0) | ||
break; | ||
printf("%d\n",a+b); | ||
} | ||
} | ||
/************************************************************** | ||
Problem: 1022 | ||
User: 202001060117 | ||
Language: C | ||
Result: Accepted | ||
Time:0 ms | ||
Memory:748 kb | ||
****************************************************************/ | ||
|
Oops, something went wrong.