結果

問題 No.296 n度寝
ユーザー Yosuke YamaguchiYosuke Yamaguchi
提出日時 2020-12-30 22:59:30
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 616 bytes
コンパイル時間 3,141 ms
コンパイル使用メモリ 74,680 KB
実行使用メモリ 54,240 KB
最終ジャッジ日時 2024-04-16 23:28:14
合計ジャッジ時間 5,667 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 117 ms
41,316 KB
testcase_04 AC 122 ms
41,244 KB
testcase_05 AC 118 ms
41,444 KB
testcase_06 AC 117 ms
41,136 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 112 ms
41,196 KB
testcase_11 AC 116 ms
41,028 KB
testcase_12 WA -
testcase_13 AC 118 ms
41,444 KB
testcase_14 AC 115 ms
41,344 KB
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class nDoNe296 {

  // https://yukicoder.me/problems/no/296
  public static void main(String[] args) {
    // 標準入力から読み込む際に、Scan
    Scanner sc = new Scanner(System.in);

    int awakeCount = Integer.parseInt(sc.next());
    int hour = Integer.parseInt(sc.next());
    int minute = Integer.parseInt(sc.next());
    int interval = Integer.parseInt(sc.next());

    minute += (awakeCount - 1) * interval;
    if (minute >= 60) {
      hour += minute / 60;
      minute = minute % 60;
    }
    System.out.println(hour);
    System.out.println(minute);

  }
}
0