結果

問題 No.734 Careful Engineer
ユーザー GrenacheGrenache
提出日時 2019-04-27 13:11:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 717 bytes
コンパイル時間 3,446 ms
コンパイル使用メモリ 72,308 KB
実行使用メモリ 56,108 KB
最終ジャッジ日時 2023-08-18 13:01:54
合計ジャッジ時間 6,927 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
55,872 KB
testcase_01 AC 133 ms
55,548 KB
testcase_02 AC 134 ms
55,828 KB
testcase_03 AC 134 ms
55,744 KB
testcase_04 AC 131 ms
55,668 KB
testcase_05 AC 132 ms
56,108 KB
testcase_06 AC 131 ms
55,700 KB
testcase_07 AC 129 ms
55,540 KB
testcase_08 AC 132 ms
55,852 KB
testcase_09 AC 133 ms
55,636 KB
testcase_10 AC 136 ms
55,736 KB
testcase_11 AC 133 ms
55,568 KB
testcase_12 AC 134 ms
55,692 KB
testcase_13 AC 133 ms
56,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.Scanner;


public class Main_yukicoder734 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();

//		60 a x >= b x + 3600c
		if (60 * a - b <= 0) {
			pr.println(-1);
		} else {
			long x = (3600 * c + 60 * a - b - 1) / (60 * a - b);
			pr.println(x);
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0