結果

問題 No.734 Careful Engineer
ユーザー rutilicus
提出日時 2021-02-21 23:52:25
言語 Kotlin
(2.1.0)
結果
WA  
実行時間 -
コード長 399 bytes
コンパイル時間 13,020 ms
コンパイル使用メモリ 427,072 KB
実行使用メモリ 56,960 KB
最終ジャッジ日時 2024-09-19 20:24:41
合計ジャッジ時間 16,029 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 8 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

    val (a, b, c) = readInputLine().split(" ").map { it.toLong() }
    val divisor = 60 * a - b

    if (divisor <= 0L || divisor > 3600L * c) {
        builder.appendLine(-1)
    } else {
        builder.appendLine((3600 * c + (divisor - 1L)) / divisor)
    }

    print(builder.toString())
}

fun readInputLine(): String {
    return readLine()!!
}
0