結果
問題 | No.296 n度寝 |
ユーザー | jimano |
提出日時 | 2018-01-27 14:13:26 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 661 bytes |
コンパイル時間 | 4,018 ms |
コンパイル使用メモリ | 72,496 KB |
実行使用メモリ | 55,740 KB |
最終ジャッジ日時 | 2023-08-28 09:50:11 |
合計ジャッジ時間 | 6,860 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 76 ms
50,508 KB |
testcase_04 | AC | 75 ms
50,780 KB |
testcase_05 | AC | 76 ms
50,368 KB |
testcase_06 | AC | 77 ms
52,080 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 78 ms
52,420 KB |
testcase_11 | AC | 76 ms
50,856 KB |
testcase_12 | WA | - |
testcase_13 | AC | 78 ms
52,404 KB |
testcase_14 | AC | 75 ms
51,016 KB |
testcase_15 | WA | - |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No0296_2 { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) { String[] str = br.readLine().split(" "); int n = Integer.parseInt(str[0]); int h = Integer.parseInt(str[1]); int m = Integer.parseInt(str[2]); int t = Integer.parseInt(str[3]); for (int i = 0; i < n - 1; i++) { m += t; if (m > 59) { h += m / 60; m = m % 60;// 繰り上げ } } System.out.print(h + "\n" + m); } catch (IOException e) { e.printStackTrace(); } } }