摘要:
水题一道,注意闰年和平年的判断。View Code #include"iostream"using namespace std;int main(){ int y,m,d; while(scanf("%d/%d/%d",&y,&m,&d)!=EOF) { int sum=0,i; for(i=1;i<m;i++) { switch(i) { case 1: sum+=31; break; case 2: { if(y%4==0&&y%100||y%400==0) { sum+=29; } else sum+= 阅读全文
posted @ 2011-04-21 16:04
聊聊IT那些事
阅读(528)
评论(0)
推荐(0)
摘要:
View Code //Problem 2013 A short problem /*Accept: 158 Submit: 452Time Limit: 1000 mSec Memory Limit : 32768 KB Problem DescriptionThe description of this problem is very short. Now give you a string(length N), and ask you the max sum of the substring which the length can't small than M.InputThe 阅读全文
posted @ 2011-04-21 14:59
聊聊IT那些事
阅读(238)
评论(0)
推荐(0)