結果

問題 No.734 Careful Engineer
ユーザー YamaKasaYamaKasa
提出日時 2018-09-28 22:17:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 478 bytes
コンパイル時間 2,958 ms
コンパイル使用メモリ 74,252 KB
実行使用メモリ 41,724 KB
最終ジャッジ日時 2024-04-20 11:05:48
合計ジャッジ時間 5,212 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
41,236 KB
testcase_01 AC 129 ms
41,108 KB
testcase_02 AC 130 ms
40,980 KB
testcase_03 AC 133 ms
41,284 KB
testcase_04 AC 130 ms
41,296 KB
testcase_05 AC 129 ms
41,048 KB
testcase_06 AC 134 ms
41,724 KB
testcase_07 AC 140 ms
41,416 KB
testcase_08 AC 136 ms
41,656 KB
testcase_09 AC 131 ms
40,928 KB
testcase_10 AC 130 ms
40,952 KB
testcase_11 AC 129 ms
40,740 KB
testcase_12 AC 119 ms
40,108 KB
testcase_13 AC 132 ms
40,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		double A = scan.nextLong();
		double B = scan.nextLong();
		double 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 = 3600 * C / (60 * A - B);
		long ans = (long)Math.ceil(t);
		System.out.println(ans);
	}
}
0