백준 #11257번 IT Passport Examination

jhj·2024년 2월 9일

백준 JAVA

목록 보기
201/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		for(int i = 0; i < n; i++) {
			String a = sc.next();
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			int total = 0;
			total = b + c + d;
			
			System.out.print(a + " " + total + " ");
			if(total >= 55) {
				if(b >= 35 * 0.3 && c >= 25 * 0.3 && d >= 40 * 0.3) {
					System.out.println("PASS");
				}else {
					System.out.println("FAIL");
				}
			}else {
				System.out.println("FAIL");
			}
		}
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글