結果

問題 No.296 n度寝
ユーザー ribenngeribennge
提出日時 2018-09-30 13:22:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 1,000 ms
コード長 434 bytes
コンパイル時間 2,301 ms
コンパイル使用メモリ 74,144 KB
実行使用メモリ 41,244 KB
最終ジャッジ日時 2024-04-20 13:32:17
合計ジャッジ時間 4,788 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
41,188 KB
testcase_01 AC 115 ms
40,916 KB
testcase_02 AC 113 ms
40,428 KB
testcase_03 AC 108 ms
40,728 KB
testcase_04 AC 101 ms
40,028 KB
testcase_05 AC 93 ms
39,800 KB
testcase_06 AC 109 ms
41,244 KB
testcase_07 AC 125 ms
41,124 KB
testcase_08 AC 107 ms
40,272 KB
testcase_09 AC 99 ms
39,744 KB
testcase_10 AC 96 ms
40,044 KB
testcase_11 AC 98 ms
40,220 KB
testcase_12 AC 107 ms
40,764 KB
testcase_13 AC 109 ms
40,260 KB
testcase_14 AC 107 ms
40,912 KB
testcase_15 AC 111 ms
40,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int H = sc.nextInt();
		int M = sc.nextInt();
		int T = sc.nextInt();
		
		M += (N - 1) * T;
		
		for(;;) {
		if(M < 60) {
		break;
		}else {
		H++;
		M -= 60;
		if(H > 23) {
			H = 0;
		}
		}
		
		}
		
		sc.close();
		
		System.out.println(H);
		System.out.println(M);
		
	}
	

}
0