結果

問題 No.734 Careful Engineer
ユーザー YamaKasaYamaKasa
提出日時 2018-09-28 22:14:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 489 bytes
コンパイル時間 2,101 ms
コンパイル使用メモリ 74,572 KB
実行使用メモリ 54,304 KB
最終ジャッジ日時 2024-04-20 11:05:06
合計ジャッジ時間 4,686 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
54,304 KB
testcase_01 AC 130 ms
54,140 KB
testcase_02 AC 128 ms
54,052 KB
testcase_03 AC 119 ms
53,320 KB
testcase_04 AC 132 ms
54,020 KB
testcase_05 AC 133 ms
54,216 KB
testcase_06 AC 129 ms
53,804 KB
testcase_07 AC 117 ms
53,016 KB
testcase_08 AC 133 ms
54,208 KB
testcase_09 AC 131 ms
54,124 KB
testcase_10 AC 135 ms
53,980 KB
testcase_11 AC 130 ms
54,120 KB
testcase_12 AC 129 ms
54,208 KB
testcase_13 AC 135 ms
53,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long A = scan.nextLong();
		long B = scan.nextLong();
		long C = scan.nextLong();
		scan.close();
		if(60 * A < B) {
			System.out.println(-1);
			System.exit(0);
		}else if(60 * A == B) {
			System.out.println(0);
			System.exit(0);
		}
		double t = (double) 3600 * C / ((double)60 * A - B);
		long ans = (long)Math.ceil(t);
		System.out.println(ans);
	}
}
0