2022年9月19日

摘要: #include <stdio.h> main( ) { int a,b,c; int flag=1; scanf("%d %d %d",&a,&b,&c); if(a+b>c&&a+c>b&&b+c>a) { if(a==b&&b==c) { printf("dengbian\n"); flag= 阅读全文

posted @ 2022-09-19 20:59 lachesism 阅读(922) 评论(0) 推荐(0)

摘要: #include <stdio.h> main( ) { int a,d=0; scanf("%d",&a); while(a>86399) { a=a-86400; d++; if(a<86399) { break; } } if(a<43199&&d!=0) { int h; h=a/3600; 阅读全文

posted @ 2022-09-19 20:25 lachesism 阅读(362) 评论(0) 推荐(0)

摘要: #include<stdio.h> #include<stdlib.h> int main(){ int n = 0; scanf("%d", &n); int result = 0; if(n < 0){ n = -n; printf("-"); } while(1) { result = n % 阅读全文

posted @ 2022-09-19 20:09 lachesism 阅读(203) 评论(0) 推荐(0)

摘要: #include"stdio.h" int main() { int x,y; scanf("%d",&x); y= x<0?-x:x; //构造一个条件表达式,当x<0时,取-x的值,否则取x的值 printf("%d",y); } 阅读全文

posted @ 2022-09-19 19:58 lachesism 阅读(225) 评论(0) 推荐(0)

摘要: #include<stdio.h> main() { int t,sum=0; while(scanf("%d",&t)!=0) { if(t 1) break; sum=sum+t; } printf("%d\n",sum); } 阅读全文

posted @ 2022-09-19 19:47 lachesism 阅读(712) 评论(0) 推荐(0)

摘要: #include<stdio.h> main() { int y; scanf("%d",&y); if((y%400==0) || (y%4==0 && y%100!=0)) { printf("YES"); } else { printf("NO"); } } 阅读全文

posted @ 2022-09-19 19:23 lachesism 阅读(94) 评论(0) 推荐(0)

摘要: #include <stdio.h> main( ) { int a,b,s; scanf("%d %d",&a,&b); if(a<=3) { s=10; } else if(a<=10) { s=10+(a-3)*2; } else { s=24+(a-10)*3; } if(b>5) { s= 阅读全文

posted @ 2022-09-19 19:11 lachesism 阅读(358) 评论(0) 推荐(0)

摘要: #include <stdio.h> main( ) { int x,y; scanf("%d %d",&x,&y); if(x>0&&y>0) { printf("I"); } else if(x<0&&y>0) { printf("II"); } else if(x<0&&y<0) { prin 阅读全文

posted @ 2022-09-19 19:05 lachesism 阅读(296) 评论(0) 推荐(0)

摘要: #include <stdio.h> main( ) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a) { printf("Y"); } else { printf("N"); 阅读全文

posted @ 2022-09-19 18:46 lachesism 阅读(230) 评论(0) 推荐(0)

摘要: #include <stdio.h> main( ) { int x; scanf("%d",&x); switch(x/10) { case 10: case 9: printf("优\n");break; case 8: printf("良\n");break; case 7: printf(" 阅读全文

posted @ 2022-09-19 18:39 lachesism 阅读(681) 评论(0) 推荐(0)

摘要: #include <stdio.h> main( ) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b) { printf("C"); } else if(b==c) { printf("A"); } else { printf("B"); } } 阅读全文

posted @ 2022-09-19 18:31 lachesism 阅读(406) 评论(0) 推荐(0)

摘要: #include <stdio.h> main( ) { int a; scanf("%d",&a); int g; g=a%10; int s; s=a/10; if(g>s) { printf("%d%d",g,s); } else { printf("%d",a); } } 阅读全文

posted @ 2022-09-19 18:17 lachesism 阅读(247) 评论(0) 推荐(0)

摘要: #include <stdio.h> main( ) { int a,b; scanf("%d %d",&a,&b); if(a%b==0) { printf("B是A的约数"); } else { printf("B不是A的约数"); } } 阅读全文

posted @ 2022-09-19 18:08 lachesism 阅读(314) 评论(0) 推荐(0)

摘要: #include <stdio.h> main( ) { int a; scanf("%d",&a); if(a<43199) { int h; h=a/3600; int m; m=(a%3600)/60; int s; s=(a%3600)%60; printf("AM %02d:%02d:%0 阅读全文

posted @ 2022-09-19 18:02 lachesism 阅读(524) 评论(0) 推荐(0)

摘要: #include <stdio.h> main( ) { int a; scanf("%d",&a); int h; h=a/3600; if(h>23) { int d; d=h/24; h=h-24; if(h>23) { h=h-24; } int m; m=(a%3600)/60; int 阅读全文

posted @ 2022-09-19 17:56 lachesism 阅读(547) 评论(0) 推荐(0)