結果

問題 No.734 Careful Engineer
ユーザー Mcpu3Mcpu3
提出日時 2018-09-29 00:10:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 503 bytes
コンパイル時間 2,314 ms
コンパイル使用メモリ 73,740 KB
実行使用メモリ 42,048 KB
最終ジャッジ日時 2024-04-20 12:23:59
合計ジャッジ時間 4,104 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
41,776 KB
testcase_01 AC 111 ms
41,812 KB
testcase_02 AC 123 ms
41,452 KB
testcase_03 AC 122 ms
41,564 KB
testcase_04 AC 107 ms
41,436 KB
testcase_05 AC 139 ms
41,680 KB
testcase_06 AC 121 ms
41,764 KB
testcase_07 AC 122 ms
41,044 KB
testcase_08 AC 124 ms
41,632 KB
testcase_09 AC 124 ms
41,688 KB
testcase_10 AC 120 ms
41,680 KB
testcase_11 AC 117 ms
41,808 KB
testcase_12 AC 108 ms
41,496 KB
testcase_13 AC 118 ms
42,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double A = sc.nextDouble(), B = sc.nextDouble(), C = sc.nextDouble();
        sc.close();
        A *= 60;
        C *= 3600;
        if (B > A) System.out.print(-1);
        else {
            if ((long)(C / (A - B)) == C / (A - B)) System.out.print((long)(C / (A - B)));
            else System.out.print((long)(C / (A - B) + 1));
        }
    }
}
0