結果

問題 No.296 n度寝
ユーザー TatsuDXTatsuDX
提出日時 2016-09-03 15:21:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 370 bytes
コンパイル時間 3,351 ms
コンパイル使用メモリ 71,784 KB
実行使用メモリ 57,532 KB
最終ジャッジ日時 2023-09-21 08:28:38
合計ジャッジ時間 6,347 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,948 KB
testcase_01 AC 126 ms
56,060 KB
testcase_02 AC 128 ms
55,856 KB
testcase_03 AC 131 ms
55,704 KB
testcase_04 AC 126 ms
56,008 KB
testcase_05 AC 129 ms
55,772 KB
testcase_06 AC 126 ms
55,932 KB
testcase_07 AC 130 ms
55,864 KB
testcase_08 AC 128 ms
55,728 KB
testcase_09 AC 128 ms
57,532 KB
testcase_10 AC 126 ms
55,728 KB
testcase_11 AC 126 ms
55,800 KB
testcase_12 AC 127 ms
55,748 KB
testcase_13 AC 127 ms
55,792 KB
testcase_14 AC 127 ms
55,972 KB
testcase_15 AC 127 ms
55,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n, h, m, t, tm, ah, am;
		n = sc.nextInt();
		h = sc.nextInt();
		m = sc.nextInt();
		t = sc.nextInt();
		tm = h*60 + m + t*(n-1);
		ah = (tm/60)%24;
		am = tm%60;
		System.out.println(ah);
		System.out.println(am);

		sc.close();
	}
}
0