본문 바로가기

IT개발자/백준_Algorithm

백준 2480번 주사위 세개 JAVA(자바) 문제 풀이

728x90
반응형
import java.util.Scanner;

public class Main {
 
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int f = scan.nextInt();
		int s = scan.nextInt();
		int t = scan.nextInt();
		
		int total = 0;
		if(f == s && f == t) {
			total = 10000 + (f*1000);
		}else if(f == s) {
			total = 1000 + (f*100);
		}else if(f == t) {
			total = 1000 + (f*100);
		}else if(s == t) {
			total = 1000 + (s*100);
		}else if(f < s && t < s){
			total = s * 100;
		}else if(s < f && t < f) {
			total = f * 100;
		}else {
			total = t *100;
		}
		
		System.out.println(total);
	}
}
728x90
반응형