SWEA 63

swea 1976 [D2] 시각 덧셈 JAVA

풀이 : 단순 덧셈, 뺄셈 Code public class Solution1976 { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); for (int tc = 1; tc 59) { result_min -= 60; // %60 를 써서 나머지로 할수도 있음. result_hour += 1; // /60 를 써서 몫으로 할수도 있음. } if (result_hour > 12) { result_hour -= 12; // %12 로 해서 나머지로 할 수 있음. } System.out.println("#" + tc + " " + result_hour ..

SWEA 2023.11.22
1 2 3 4 5 6 7