import java.io.*;
import java.util.*;
class Solution {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
int T = Integer.parseInt((br.readLine().trim()));
String[] day_arr = {"MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"};
for (int tc= 1; tc <= T; tc++) {
String day = br.readLine();
int today = Arrays.asList(day_arr).indexOf(day);
int left_day = 6 - today;
if (left_day == 0) left_day = 7;
bw.write("#"+String.valueOf(tc)+" "+String.valueOf(left_day)+"\n");
}
bw.flush();
bw.close();
}
}
'알고리즘 > 삼성 SW expert Academy' 카테고리의 다른 글
[SWEA] 11856. 반반_JAVA (0) | 2022.05.18 |
---|---|
[SWEA] 12741. 두 전구_JAVA (0) | 2022.05.17 |
[SWEA] 1204. [S/W 문제해결 기본] 1일차 - 최빈수 구하기_JAVA (0) | 2022.05.12 |
[SWEA] 1288. 새로운 불면증 치료법_JAVA (0) | 2022.05.11 |
[SWEA] 1954. 달팽이 숫자_JAVA (0) | 2022.05.09 |