結果

問題 No.734 Careful Engineer
ユーザー Mcpu3Mcpu3
提出日時 2018-09-29 00:08:01
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 495 bytes
コンパイル時間 1,795 ms
コンパイル使用メモリ 73,692 KB
実行使用メモリ 41,788 KB
最終ジャッジ日時 2024-04-20 12:20:59
合計ジャッジ時間 4,143 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
40,680 KB
testcase_01 WA -
testcase_02 AC 117 ms
40,664 KB
testcase_03 AC 124 ms
41,308 KB
testcase_04 AC 126 ms
41,788 KB
testcase_05 AC 122 ms
41,304 KB
testcase_06 AC 120 ms
40,932 KB
testcase_07 AC 123 ms
40,928 KB
testcase_08 AC 119 ms
40,812 KB
testcase_09 AC 113 ms
40,740 KB
testcase_10 AC 121 ms
40,848 KB
testcase_11 AC 123 ms
41,360 KB
testcase_12 AC 112 ms
40,592 KB
testcase_13 AC 118 ms
41,192 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(C / (A - B));
            else System.out.print((long)(C / (A - B) + 1));
        }
    }
}
0