結果
問題 | No.734 Careful Engineer |
ユーザー |
|
提出日時 | 2019-04-27 13:11:17 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 128 ms / 2,000 ms |
コード長 | 717 bytes |
コンパイル時間 | 4,953 ms |
コンパイル使用メモリ | 76,852 KB |
実行使用メモリ | 46,528 KB |
最終ジャッジ日時 | 2025-06-20 00:45:59 |
合計ジャッジ時間 | 6,551 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
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); } } }