문제

문제출처 : Baekjoon

img

풀이

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();

        String[] arr = str.split(" ");
        int Soong = Integer.parseInt(arr[0]);
        int Korea = Integer.parseInt(arr[1]);
        int Han = Integer.parseInt(arr[2]);

        int sum = Soong+Korea+Han;

        if(sum >= 100){
            System.out.println("OK");
        }else{
            if(Soong < Korea && Soong < Han){
                System.out.println("Soongsil");
            }else if(Korea < Soong && Korea < Han){
                System.out.println("Korea");
            }else{
                System.out.println("Hanyang");
            }
        }
    }
}


회고

  1. 이정도 문제는 가볍게 풀 수 있다…! 다른방법(split을 안쓰고 푼다던가~! )으로는 어떻게 풀 수 있을까… 흐음🤔