题目链接:http://bailian.openjudge.cn/practice/2723
#include<stdio.h>
int main()
{
int day[13]={0,12,31,28,31,30,31,30,31,31,30,31,30};
int w;
int i;
scanf("%d",&w);
for(i=1;i<=12;i++)
{w=(w+day[i])%7;
if(w==5) printf("%d\n",i);
}
return 0;
}