No sweet without sweat

[백준 / 2480번 ] 자바(JAVA) 주사위 세개 본문

백준

[백준 / 2480번 ] 자바(JAVA) 주사위 세개

Remi 2023. 1. 12. 22:34
728x90
반응형

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        StringTokenizer st = new StringTokenizer(br.readLine());


        int a = Integer.parseInt(st.nextToken());
        int b = Integer.parseInt(st.nextToken());
        int c = Integer.parseInt(st.nextToken());

        int result = 0;
        if(a==b && a==c && b==c){
            result = 10000 + a * 1000;
        }else if(a==b || a==c){
            result = 1000 + a * 100;
        }else if(b==c && b!=a){
            result = 1000 + b * 100;
        }else{
            result = Math.max(a, Math.max(b, c))*100;
        }
        System.out.println(result);

    }
}
728x90
반응형

'백준' 카테고리의 다른 글

[백준 10951번] : A+B - 4 / 자바(JAVA)  (0) 2023.01.31
[ 백준 10952번 자바(JAVA) ] - A+B - 5 문  (0) 2023.01.30
[백준 9498] 시험 성적  (0) 2023.01.08
[백준/10171] 자바 고양이  (0) 2023.01.06
[백준/2588] 자바 곱  (0) 2023.01.05
Comments