Notice
Recent Posts
Recent Comments
Link
«   2025/12   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Tags more
Archives
Today
Total
관리 메뉴

jeongwon

[백준] 2480번 주사위 세 개 본문

오늘의 문제

[백준] 2480번 주사위 세 개

jeongwon_ 2022. 5. 18. 11:51

나의 답안:

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int d1=sc.nextInt();
		int d2=sc.nextInt();
		int d3=sc.nextInt();
		sc.close();
        
		int money;
		if(d1==d2&&d2==d3) money=10000+d1*1000;
		else if(d1==d2||d2==d3) money=1000+d2*100;
		else if(d2==d3||d1==d3) money=1000+d3*100;
		else {
			if(d1<d2)d1=d2;
			if(d1<d3)d1=d3;
			money=d1*100;
		}
		System.out.println(money);
	}
}