백준 #20499번 Darius님 한타 안 함?

jhj·2024년 2월 13일

백준 JAVA

목록 보기
271/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
		String[] b = a.split("/");
		
		int k = Integer.parseInt(b[0]);
		int d = Integer.parseInt(b[1]);
		int s = Integer.parseInt(b[2]);
		
		if(k + s < d || d == 0) {
			System.out.println("hasu");
		}else {
			System.out.println("gosu");
		}
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글