結果
問題 | No.296 n度寝 |
ユーザー | jonki324 |
提出日時 | 2018-06-06 17:14:51 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 589 bytes |
コンパイル時間 | 1,915 ms |
コンパイル使用メモリ | 72,720 KB |
実行使用メモリ | 56,248 KB |
最終ジャッジ日時 | 2023-09-12 22:45:17 |
合計ジャッジ時間 | 4,952 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 120 ms
56,072 KB |
testcase_04 | AC | 120 ms
55,912 KB |
testcase_05 | AC | 121 ms
55,812 KB |
testcase_06 | AC | 121 ms
55,716 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 122 ms
56,120 KB |
testcase_10 | AC | 122 ms
53,580 KB |
testcase_11 | AC | 120 ms
55,740 KB |
testcase_12 | AC | 121 ms
55,548 KB |
testcase_13 | AC | 121 ms
55,292 KB |
testcase_14 | AC | 123 ms
56,040 KB |
testcase_15 | AC | 120 ms
55,508 KB |
ソースコード
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int h = scan.nextInt(); int m = scan.nextInt(); int t = scan.nextInt(); int tmp = (n - 1) * t; int ch = tmp / 60; int cm = tmp - ch * 60; if ( (m += cm) >= 60 ) { m -= 60; ch++; } if ( (h += ch) >= 24 ) { h -= 24; } System.out.println(h); System.out.println(m); scan.close(); } }