@summerdir:
#include <iostream>
using namespace std;
int year0=1990;
int month0=1;
int day0=1;
int days(int y,int m,int d);//计算天数
int main()
{
int year,month,day;
while (cin>>year>>month>>day)
{
if (days(year,month,day)%5/3==0)
{
cout<<"DA YU"<<endl;
}
else cout<<"SHAI WANG"<<endl;
}
return 0;
}
int JudgeYear(int year)
{
return (year%400==0)||(year%4==0&&year%100!=0);//是闰年返回1 不是返回0
}
int days(int y,int m,int d)
{
int days=0;
int i;
int Dtable[]={31,28,31,30,31,30,31,31,30,31,30,31};
if (JudgeYear(y))
Dtable[1]=29;
for(i=year0;i<y;i++)
days=days+365+JudgeYear(i);
for (i=month0;i<m;i++)
days=days+Dtable[i-1];
days=days+d-day0;
return days;
}