#include<iostream>
using namespace std;
int main()
{
int l;
int m[12],d;
string days[7] ={"Saturday","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday"};
int months[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
cin>>l;
int i,j;
int count;
for(i=0;i<l;i++)
{
cin>>m[i]>>d;
count =0;
count+= d;
if(m[i]>1)
{
for(j=0;j<m[i]-1;j++)
{
count+= months[j];
}
}
cout << days[(count%7)-1] << endl;
}
return 0;
}
1.int m[12],d;
2.cout << days[(count%7)-1] << endl;
1. 測資最多有100筆,m[12]會超出陣列範圍
2. 如果count%7是0,你會存取到days[-1]