백준 #16017번 Telemarketer or not?

jhj·2024년 2월 12일

백준 JAVA

목록 보기
238/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		
		if(a == 8 || a == 9) {
			if(b == c) {
				if(d == 8 || d == 9) {
					System.out.println("ignore");
				}else {
					System.out.println("answer");
				}
			}else {
				System.out.println("answer");
			}
		}else {
			System.out.println("answer");
		}
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글