結果

問題 No.296 n度寝
ユーザー tom_tom_tomtom_tom_tom
提出日時 2015-11-07 19:39:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 1,000 ms
コード長 810 bytes
コンパイル時間 4,206 ms
コンパイル使用メモリ 71,368 KB
実行使用メモリ 56,088 KB
最終ジャッジ日時 2023-09-21 03:47:00
合計ジャッジ時間 6,214 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,584 KB
testcase_01 AC 120 ms
55,572 KB
testcase_02 AC 122 ms
55,588 KB
testcase_03 AC 120 ms
55,448 KB
testcase_04 AC 122 ms
55,988 KB
testcase_05 AC 122 ms
55,764 KB
testcase_06 AC 121 ms
53,780 KB
testcase_07 AC 124 ms
56,024 KB
testcase_08 AC 121 ms
55,428 KB
testcase_09 AC 122 ms
55,652 KB
testcase_10 AC 119 ms
55,808 KB
testcase_11 AC 122 ms
56,088 KB
testcase_12 AC 119 ms
55,500 KB
testcase_13 AC 120 ms
55,468 KB
testcase_14 AC 123 ms
55,716 KB
testcase_15 AC 122 ms
55,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

/**
 * http://yukicoder.me/problems/822
 */
public class YukiCoder296 {

    public static void main(String[] args) {

        run(args);

    }

    public static void run(String[] args) {
//        Scanner sc = new Scanner("2 7 30 5");
//        Scanner sc = new Scanner("1 8 0 5");
//        Scanner sc = new Scanner("7 8 0 5");
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int h = sc.nextInt();
        int m = sc.nextInt();
        int t = sc.nextInt();

        int total = t * (n - 1);
        int min = (total + m) % 60;
        int hour = (((total + m) / 60) + h) % 24;
        System.out.println(hour);
        System.out.println(min);
    }

    public void test() {
        // 2 7 30 5    , 7 35

//        System.out("")
    }


}
0