結果

問題 No.734 Careful Engineer
ユーザー takeya_okinotakeya_okino
提出日時 2019-09-15 11:15:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 441 bytes
コンパイル時間 1,985 ms
コンパイル使用メモリ 71,404 KB
実行使用メモリ 56,104 KB
最終ジャッジ日時 2023-09-21 04:03:31
合計ジャッジ時間 4,710 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,104 KB
testcase_01 AC 128 ms
55,856 KB
testcase_02 AC 126 ms
55,892 KB
testcase_03 AC 126 ms
55,408 KB
testcase_04 AC 127 ms
55,704 KB
testcase_05 AC 128 ms
55,884 KB
testcase_06 AC 124 ms
55,604 KB
testcase_07 AC 127 ms
55,628 KB
testcase_08 AC 125 ms
55,844 KB
testcase_09 AC 124 ms
55,748 KB
testcase_10 AC 126 ms
55,752 KB
testcase_11 AC 125 ms
56,088 KB
testcase_12 AC 124 ms
55,368 KB
testcase_13 AC 124 ms
55,944 KB
権限があれば一括ダウンロードができます

ソースコード

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