結果

問題 No.296 n度寝
ユーザー GrenacheGrenache
提出日時 2015-11-06 22:25:22
言語 Java19
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 491 bytes
コンパイル時間 4,451 ms
コンパイル使用メモリ 71,244 KB
実行使用メモリ 57,652 KB
最終ジャッジ日時 2023-09-21 03:40:32
合計ジャッジ時間 6,228 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,992 KB
testcase_01 AC 126 ms
55,856 KB
testcase_02 AC 126 ms
56,080 KB
testcase_03 AC 125 ms
55,608 KB
testcase_04 AC 127 ms
55,600 KB
testcase_05 AC 127 ms
56,064 KB
testcase_06 AC 126 ms
55,836 KB
testcase_07 AC 126 ms
55,600 KB
testcase_08 AC 125 ms
55,732 KB
testcase_09 AC 125 ms
55,640 KB
testcase_10 AC 126 ms
55,992 KB
testcase_11 AC 125 ms
55,472 KB
testcase_12 AC 127 ms
57,652 KB
testcase_13 AC 127 ms
55,656 KB
testcase_14 AC 125 ms
55,436 KB
testcase_15 AC 126 ms
55,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder296 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int h = sc.nextInt();
        int m = sc.nextInt();
        int t = sc.nextInt();

        long ret = m + 60 * h;

        long tmp = (long)(n - 1) * t;
        ret += tmp;
        ret %= 1440;

        System.out.println(ret / 60);
        System.out.println(ret % 60);

        sc.close();
    }
}
0