結果

問題 No.296 n度寝
ユーザー GBGB
提出日時 2018-04-10 21:58:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 1,000 ms
コード長 417 bytes
コンパイル時間 1,901 ms
コンパイル使用メモリ 72,084 KB
実行使用メモリ 56,060 KB
最終ジャッジ日時 2023-09-09 03:51:06
合計ジャッジ時間 4,596 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,440 KB
testcase_01 AC 113 ms
56,060 KB
testcase_02 AC 112 ms
55,764 KB
testcase_03 AC 113 ms
55,716 KB
testcase_04 AC 112 ms
55,716 KB
testcase_05 AC 114 ms
55,856 KB
testcase_06 AC 112 ms
55,600 KB
testcase_07 AC 111 ms
54,084 KB
testcase_08 AC 112 ms
55,720 KB
testcase_09 AC 115 ms
55,380 KB
testcase_10 AC 113 ms
55,780 KB
testcase_11 AC 116 ms
56,060 KB
testcase_12 AC 115 ms
55,644 KB
testcase_13 AC 115 ms
55,888 KB
testcase_14 AC 114 ms
55,600 KB
testcase_15 AC 113 ms
55,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main{
  public static void main(String[] args) throws IOException{

    Scanner scan=new Scanner(System.in);
    int n=Integer.parseInt(scan.next());
    int h=Integer.parseInt(scan.next());
    int m=Integer.parseInt(scan.next());
    int t=Integer.parseInt(scan.next());

    int at=h*60+m+t*(n-1);

    System.out.println(at/60%24);
    System.out.println(at%60);
  }
}
0