chenxi16

导航

2020年6月29日 #

PATA -1008 Elevator

摘要: #include<stdio.h> using namespace std; int main(){ int n; scanf("%d",&n); int b,nowb,subb,res=0; b=0; for(int i=0;i<n;i++){ scanf("%d",&nowb); subb = 阅读全文

posted @ 2020-06-29 23:31 chenxi16 阅读(78) 评论(0) 推荐(0) 编辑

PATA -1006 Sign In and Sign Out

摘要: #include<stdio.h> #include<string.h> using namespace std; struct t{ int h,m,s; t(){h=0;m=0;s=0;} }; struct t tranvert(char[]); int comparet(char [],ch 阅读全文

posted @ 2020-06-29 23:11 chenxi16 阅读(145) 评论(0) 推荐(0) 编辑

2020年4月18日 #

PAT (Basic Level) Practice (中文) 1026 程序运行时间

摘要: #include<stdio.h> #include<math.h> using namespace std; int main(){ int c1,c2,h,m,s; int c; scanf("%d %d",&c1,&c2); c = (c2-c1); h = c / (3600*100); m 阅读全文

posted @ 2020-04-18 18:19 chenxi16 阅读(94) 评论(0) 推荐(0) 编辑

2020年4月16日 #

PAT (Basic Level) Practice (中文) 1024 科学计数法

摘要: 1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 using namespace std; 5 const int maxn = 100000; 6 char a[maxn]; 7 int main(){ 8 int e 阅读全文

posted @ 2020-04-16 15:51 chenxi16 阅读(164) 评论(0) 推荐(0) 编辑

PAT (Basic Level) Practice (中文)1023 组个最小数

摘要: 1 #include<stdio.h> 2 #include<algorithm> 3 #include<string.h> 4 using namespace std; 5 const int maxn = 50; 6 int main(){ 7 int a[10],count=0,value; 阅读全文

posted @ 2020-04-16 15:06 chenxi16 阅读(96) 评论(0) 推荐(0) 编辑

PAT (Basic Level) Practice (中文) 1020 月饼

摘要: 1 #include<stdio.h> 2 #include<algorithm> 3 using namespace std; 4 const int MAXN=1001; 5 struct kind{ 6 double num,price,p_price; 7 }; 8 int d,n; 9 s 阅读全文

posted @ 2020-04-16 10:51 chenxi16 阅读(138) 评论(0) 推荐(0) 编辑

2020年4月15日 #

PAT (Basic Level) Practice (中文) 1019 数字黑洞

摘要: 1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 using namespace std; 5 char n[5]; 6 bool cmp(char a,char b){//降序 7 return a>b; 8 } 9 阅读全文

posted @ 2020-04-15 11:17 chenxi16 阅读(130) 评论(0) 推荐(0) 编辑

PAT (Basic Level) Practice (中文) 1018 锤子剪刀布

摘要: 1 #include<stdio.h> 2 3 // c:0 j:1 b:2 0:胜 1:平 2:负 4 int n,p1[3],p2[3],num[3]; 5 6 void read(); 7 void deal(int x,int y); 8 int change(char a); 9 char 阅读全文

posted @ 2020-04-15 10:02 chenxi16 阅读(129) 评论(0) 推荐(0) 编辑

2020年4月14日 #

PAT (Basic Level) Practice (中文) 1017 A除以B

摘要: 1 #include<cstdio> 2 #include<cstring> 3 using namespace std; 4 const int MAXN=1001; 5 char a[MAXN]; 6 int b; 7 int q[MAXN],r[MAXN]; 8 void read(); 9 阅读全文

posted @ 2020-04-14 17:16 chenxi16 阅读(111) 评论(0) 推荐(0) 编辑

PAT (Basic Level) Practice (中文)1016 部分A+B

摘要: 1 #include<cstdio> 2 #include<cstring> 3 using namespace std; 4 const int MAXN=13; 5 char a[MAXN],b[MAXN]; 6 char da,db; 7 void read(); 8 long long in 阅读全文

posted @ 2020-04-14 16:48 chenxi16 阅读(122) 评论(0) 推荐(0) 编辑