#include <bits/stdc++.h>
using namespace std;
int main()
{
int i,j,n;
int m;
cin>>m;
while(m--)
{
scanf("%d %d",&i,&j);
switch(j)
{
case 1: n=31;
break;
case 2:
{
if(i%4==0){ n=29;}
else {n=28;}
}
break;
case 3: n=31;
break;
case 4: n=30;
break;
case 5: n=31;
break;
case 6: n=30;
break;
case 7: n=31;
break;
case 8: n=31;
break;
case 9: n=30;
break;
case 10: n=31;
break;
case 11: n=30;
break;
case 12: n=31;
break;
default:printf("ERROR\n");
}
printf("%d\n",n); }
return 0;
}
本应该输出的是ERROR但是后面会多出来一个O,这是怎么回事呀,这是一个求某年某个月的天数的代码