結果

問題 No.296 n度寝
ユーザー cande398cande398
提出日時 2017-10-10 17:00:16
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 495 bytes
コンパイル時間 5,564 ms
コンパイル使用メモリ 73,936 KB
実行使用メモリ 58,852 KB
最終ジャッジ日時 2023-08-10 22:27:55
合計ジャッジ時間 5,601 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 145 ms
56,880 KB
testcase_04 AC 138 ms
57,208 KB
testcase_05 AC 140 ms
56,968 KB
testcase_06 AC 138 ms
57,100 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 136 ms
56,824 KB
testcase_11 AC 138 ms
56,652 KB
testcase_12 WA -
testcase_13 AC 137 ms
56,668 KB
testcase_14 AC 137 ms
56,896 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