結果

問題 No.734 Careful Engineer
ユーザー takeya_okino
提出日時 2019-09-15 11:15:52
言語 Java
(openjdk 23)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 441 bytes
コンパイル時間 2,934 ms
コンパイル使用メモリ 79,960 KB
実行使用メモリ 41,684 KB
最終ジャッジ日時 2025-06-20 00:46:16
合計ジャッジ時間 5,075 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long a = sc.nextLong();
    long b = sc.nextLong();
    long c = sc.nextLong();
    long ans = -1;
    if(60 * a > b) {
      if((3600 * c) % (60 * a - b) == 0) {
        ans = (3600 * c) / (60 * a - b);
      } else {
        ans = (3600 * c) / (60 * a - b) + 1;
      }
    }
    System.out.println(ans);
  }
}
0