Deep_Dev

https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AX0SaDW6L2oDFASs 

 

SW Expert Academy

SW ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์—ญ๋Ÿ‰ ๊ฐ•ํ™”์— ๋„์›€์ด ๋˜๋Š” ๋‹ค์–‘ํ•œ ํ•™์Šต ์ปจํ…์ธ ๋ฅผ ํ™•์ธํ•˜์„ธ์š”!

swexpertacademy.com

 

 


์ด๊ฒŒ ์™œ๋˜ D3์ธ์ง€ ๋ชจ๋ฅด๊ฒ ๋‹ค ,,,,

 

 

 

 

import java.util.Scanner;
import java.io.FileInputStream;
class Solution
{
    public static void main(String args[]) throws Exception
    {
     Scanner kb=new Scanner(System.in);
        int n=kb.nextInt();
        int[] answer=new int[n];
        String[] arr=new String[n];
        for(int i=0; i<n; i++) arr[i]=kb.next();
        String[] s={"SUN","MON","TUE","WED","THU","FRI","SAT"};
        for(int i=0; i<n; i++){
            for(int j=0; j<s.length; j++){
                if(arr[i].equals(s[j]))
                    answer[i]=7-j;
            }
        }
        for(int i=0; i<n; i++) System.out.println("#"+(i+1)+" "+answer[i]);
    }
}