Deep_Dev

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AWWxpEDaAVoDFAW4&categoryId=AWWxpEDaAVoDFAW4&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=3&pageSize=30&pageIndex=4 

 

SW Expert Academy

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

swexpertacademy.com

 

 

 


์ž…๋ ฅ๋ฐ›๋Š” ์ˆ˜์˜ ๋ฒ”์œ„๊ฐ€ ๊ธธ์ˆ˜์žˆ์–ด์„œ, ๊ทธ๋ƒฅ string์œผ๋กœ ์ž…๋ ฅ๋ฐ›๊ณ ๋‚˜์„œ

๋ฌธ์ž์—ด์˜ ๋งˆ์ง€๋ง‰ ์ž๋ฆฌ๋งŒ temp์— ๋‹ด์•„ ์ง์ˆ˜์ธ์ง€, ํ™€์ˆ˜์ธ์ง€ ํŒ๋ณ„

 

 

 

import java.util.Scanner;
class Solution{
    public static void main(String args[]) throws Exception{
         Scanner kb=new Scanner(System.in);
        int T=kb.nextInt();
        for(int test_case=1; test_case<=T; test_case++){
           String s=kb.next();
           int temp=Character.getNumericValue(s.charAt(s.length()-1));
           if(temp%2!=0) System.out.println("#"+test_case+" "+"Odd");
           else System.out.println("#"+test_case+" "+"Even");
        }
    }
}