Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:Why WA?In Reply To:Why WA? Posted by:betaver at 2006-10-22 00:08:42 > Why I'm WA? And I don't konw if it is only 1 test case? > > //PKKU3047 Bovine Birthday > #include <stdio.h> > #include <stdlib.h> > > int y,m,d,w,c; > char *weekday[]={"sunday","monday","tuesday","wednesday","thursday","friday","saturday"}; > > int main() > { > scanf("%d%d%d",&y,&m,&d); > if (m>=3) m-=2; > else if (m==1) m=11,y--; > else m==12,y--; > c=y/100; > y=y%100; > w=(c/4-2*c+y+y/4+((13*m-1)/5)+d)%7; > printf("%s\n",weekday[w]); > system("pause"); > } Errr, without the line --- system("pause"); Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator