結果

問題 No.734 Careful Engineer
ユーザー YamaKasaYamaKasa
提出日時 2018-09-28 22:13:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 489 bytes
コンパイル時間 1,856 ms
コンパイル使用メモリ 74,156 KB
実行使用メモリ 54,364 KB
最終ジャッジ日時 2024-04-20 11:04:36
合計ジャッジ時間 4,239 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
54,324 KB
testcase_01 AC 98 ms
52,784 KB
testcase_02 AC 115 ms
54,056 KB
testcase_03 AC 114 ms
54,176 KB
testcase_04 AC 100 ms
52,956 KB
testcase_05 AC 101 ms
53,048 KB
testcase_06 AC 104 ms
53,040 KB
testcase_07 AC 118 ms
54,160 KB
testcase_08 AC 111 ms
53,284 KB
testcase_09 AC 114 ms
54,200 KB
testcase_10 AC 114 ms
54,364 KB
testcase_11 AC 120 ms
54,140 KB
testcase_12 AC 111 ms
53,896 KB
testcase_13 AC 104 ms
53,000 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(1);
			System.exit(0);
		}
		double t = (double) 3600 * C / ((double)60 * A - B);
		long ans = (long)Math.ceil(t);
		System.out.println(ans);
	}
}
0