백준 #29863번 Arno's Sleep Schedule

jhj·2024년 2월 4일

백준 JAVA

목록 보기
136/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		
		if(20 <= a && a <= 23) {
			System.out.println(24 - a + b);
		}else {
			System.out.println(b - a);
		}
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글