
[백준|자바] 2884: 알람시계 (if문 활용)
·
Problem Solving/백준
문제 https://www.acmicpc.net/problem/2884 2884번: 알람 시계 상근이는 매일 아침 알람을 듣고 일어난다. 알람을 듣고 바로 일어나면 다행이겠지만, 항상 조금만 더 자려는 마음 때문에 매일 학교를 지각하고 있다. 상근이는 모든 방법을 동원해보았지만, www.acmicpc.net 실행화면 코드 import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); //'시'를 입력받는 변수 int m = sc.nextInt(); //'분'을 입력받는 변수 if (m>=45) { System..