結果

問題 No.296 n度寝
ユーザー cande398cande398
提出日時 2017-10-10 17:00:16
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 495 bytes
コンパイル時間 3,210 ms
コンパイル使用メモリ 86,564 KB
実行使用メモリ 57,004 KB
最終ジャッジ日時 2024-04-28 15:27:35
合計ジャッジ時間 5,282 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 145 ms
54,748 KB
testcase_04 AC 147 ms
54,712 KB
testcase_05 AC 151 ms
54,732 KB
testcase_06 AC 146 ms
54,816 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 148 ms
54,968 KB
testcase_11 AC 154 ms
54,656 KB
testcase_12 WA -
testcase_13 AC 147 ms
54,920 KB
testcase_14 AC 163 ms
54,836 KB
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main{
  public static void main(String[] args){
    int i;
    Scanner sc = new Scanner(System.in);
    String[] line = sc.nextLine().split(" ");
    int[] time = new int[4];
    for(i=0;i<4;i++)time[i] = Integer.parseInt(line[i]);
    time[2] = time[2] + (time[0] - 1) * time[3];
    if(time[2]>59){
      time[1]++;
      if(time[1]>23){
        time[1] = 0;
      }
      time[2] = time[2] - 60;
    }
    System.out.println(time[1] + "\n" + time[2]);
  }
}
0