标签:miss sam code == -- 输出 main 判断 pre
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 210255 Accepted Submission(s): 73448
31,28,31,30,31,30,31,31,30,31,30,31闰年的判断
1 #include<stdio.h> 2 3 int main() 4 { 5 int a,b,c,i,sum; 6 while(~scanf("%d/%d/%d",&a,&b,&c)) 7 { 8 int m[12]={31,28,31,30,31,30,31,31,30,31,30,31},sum=0; 9 if((a%4==0&&a%100!=0)||a%400==0)m[1]=29; 10 for(i=0;i<b-1;i++) 11 sum+=m[i]; 12 sum+=c; 13 printf("%d\n",sum); 14 } 15 return 0; 16 }
标签:miss sam code == -- 输出 main 判断 pre
原文地址:https://www.cnblogs.com/lightice/p/10261100.html