2、");}intmain(){intn;scanf("%d",&n);getchar();charstr[200][10];for(inti=0;i#include#includeintmain(){inti,m,n;while(scanf("%d",&n)!=EOF){m=sqrt(n);for(i=2;i<=m;i++)if(n%i==0)break;if(i>m)printf("Yes");el
3、seprintf("No");}return0;}#includeinttype(int);charweek[7][10]={"Saturday","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday"};intyear[2]={365,366};intmonth[2][12]={31,28,31,30,31,30,31,31,30,31,30,31,31,29,31,30,31,30,31,31,30,31,30,31};intmain(){intdays,dayofweek,i
4、,j;while(scanf("%d",&days)&&days!=-1){dayofweek=days%7;for(i=2000;days>=year[type(i)];i++)days-=year[type(i)];for(j=0;days>=month[type(i)][j];j++)days-=month[type(i)][j];printf("%d-%02d-%02d%s",i,j+1,days+1,week[dayofweek]);}return0;}inttype(intm){if(m%4!=0
5、
6、(m%100==0&&m%400!=0))retu
7、rn0;elsereturn1;}#include#defineYYYY2007#defineMM10#defineDD10intsum(intyyyy,intmm){switch(mm){case4:case6:case9:case11:return30;break;case2:{if(yyyy%4==0&&yyyy%100!=0)return29;elseif(yyyy%400==0)return29;elsereturn28;break;}default:return31;break;}}intmain(){intn;while(scanf(
8、"%d",&n)!=EOF){intdd,mm=10,yyyy=2007;dd=n+DD;do{if(sum(yyyy,mm)>=dd){printf("%d-%02d-%02d",yyyy,mm,dd);break;}else{dd=dd-sum(yyyy,mm);mm=mm+1;if(mm>12){mm=1;yyyy=yyyy+1;}}}while(1);}return0;}#include#includeintn_to_ten(intnum,intn){intsum=0,i=1;for(;num>0;){sum+=nu
9、m%10*i;i*=n;num/=10;}returnsum;}charto_char(intn){if(n>10)return'A'+n-10;elsereturnn+48;}voidten_to_n(intnum,intn){charstr[100];inti=0;for(;n>0;){str[i++]=to_char(num%n);num/=n;}for(i=i-1;i>=0;i--)putchar(str[i]);putchar('');}intmaxN(intn,intm,intq){intr=0;for(;n>0;){r=r>n%10?r:n%1