結果

問題 No.734 Careful Engineer
ユーザー GrenacheGrenache
提出日時 2019-04-27 13:11:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 717 bytes
コンパイル時間 3,394 ms
コンパイル使用メモリ 74,900 KB
実行使用メモリ 41,704 KB
最終ジャッジ日時 2024-05-05 18:18:16
合計ジャッジ時間 5,426 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
41,252 KB
testcase_01 AC 110 ms
40,996 KB
testcase_02 AC 119 ms
41,536 KB
testcase_03 AC 106 ms
40,128 KB
testcase_04 AC 114 ms
41,320 KB
testcase_05 AC 115 ms
41,248 KB
testcase_06 AC 116 ms
41,340 KB
testcase_07 AC 103 ms
40,252 KB
testcase_08 AC 113 ms
41,180 KB
testcase_09 AC 121 ms
41,184 KB
testcase_10 AC 123 ms
41,464 KB
testcase_11 AC 120 ms
41,084 KB
testcase_12 AC 123 ms
41,704 KB
testcase_13 AC 111 ms
40,184 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