백준 #15025번 Judging Moose

jhj·2024년 2월 11일

백준 JAVA

목록 보기
226/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int l = sc.nextInt();
		int r = sc.nextInt();
		
		if(l == 0 && r == 0) {
			System.out.println("Not a moose");
		}else {
			if(l == r) {
				System.out.println("Even " + 2 * l);
			}else if(l > r) {
				System.out.println("Odd " + 2 * l);
			}else {
				System.out.println("Odd " + 2 * r);
			}
		}
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글