백준 #2480번 주사위 세개

jhj·2024년 2월 5일

백준 JAVA

목록 보기
149/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();
		
		if(a == b && b == c) {
			System.out.println(10000 + a * 1000);
		}else if(a == b || a == c) {
			System.out.println(1000 + a * 100);
		}else if(b == c) {
			System.out.println(1000 + b * 100);
		}else {
			if(a > b && b > c || a > c && c > b) {
				System.out.println(a * 100);
			}else if(b > a && a > c || b > c && c > a) {
				System.out.println(b * 100);
			}else if(c > a && a > b || c > b && b > a) {
				System.out.println(c * 100);
			}
		}
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글