[백준] 20499번 : Darius님 한타 안 함? - Java(자바)

강재원·2022년 9월 17일
0

[코딩테스트] Java

목록 보기
44/200



https://www.acmicpc.net/problem/20499

import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s=new Scanner(System.in);
        String st[]=s.nextLine().split("/");
        int k=Integer.parseInt(st[0]);
        int d=Integer.parseInt(st[1]);
        int a=Integer.parseInt(st[2]);
        if(k+a<d || d==0) System.out.print("hasu");
        else System.out.print("gosu");
    }
}
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글