import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner input = new Scanner(System.in);
int h, q, m, j, k, year;
year = input.nextInt();
m = input.nextInt();
q = input.nextInt();
j = year/100;
k = year%100;
if(m==1){
m = 13;
year = year - 1;
}
else if(m==2){
m = 14;
year = year - 1;
}
h = (q + 26*(m+1)/10 + k + k/4 + j/4 + 5*j)%7;
if(h == 0){
System.out.println("Saturday");
}
else if(h == 1){
System.out.println("Sunday");
}
else if(h == 2){
System.out.println("Monday");
}
else if(h == 3){
System.out.println("Tuesday");
}
else if(h == 4){
System.out.println("Wednesday");
}
else if(h == 5){
System.out.println("Thursday");
}
else if(h == 6){
System.out.println("Friday");
}
}
}
버림이랬는데
어차피 걍 나오는 숫자 모두 int로 선언해버리면
소숫점 알아서 버려질거라고 생각해서 다 int로 했는데
왜답은 Monday가 나올까요..ㅠㅠ