結果

問題 No.296 n度寝
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-20 11:02:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 442 bytes
コンパイル時間 2,048 ms
コンパイル使用メモリ 74,104 KB
実行使用メモリ 54,316 KB
最終ジャッジ日時 2024-04-10 02:13:06
合計ジャッジ時間 4,872 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
53,968 KB
testcase_01 AC 131 ms
54,072 KB
testcase_02 AC 130 ms
54,316 KB
testcase_03 AC 130 ms
54,156 KB
testcase_04 AC 131 ms
54,004 KB
testcase_05 AC 130 ms
54,120 KB
testcase_06 AC 130 ms
53,752 KB
testcase_07 AC 130 ms
54,248 KB
testcase_08 AC 129 ms
53,860 KB
testcase_09 AC 130 ms
54,068 KB
testcase_10 AC 130 ms
54,100 KB
testcase_11 AC 131 ms
54,232 KB
testcase_12 AC 130 ms
54,152 KB
testcase_13 AC 129 ms
54,012 KB
testcase_14 AC 129 ms
54,012 KB
testcase_15 AC 130 ms
54,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long N = sc.nextLong();
    long H = sc.nextLong();
    long M = sc.nextLong();
    long T = sc.nextLong();
    long wake = (N - 1) * T + 60 * H + M;
    wake = wake % ((long)(60 * 24));
    long ansh = wake / 60;
    long ansm = wake - 60 * ansh;
    System.out.println(ansh);
    System.out.println(ansm);
  }
}
0