結果

問題 No.994 ばらばらコイン
ユーザー da_louisda_louis
提出日時 2020-02-22 18:37:48
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 293 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 13,820 ms
コンパイル使用メモリ 436,172 KB
実行使用メモリ 57,028 KB
最終ジャッジ日時 2024-04-18 02:59:34
合計ジャッジ時間 18,103 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 284 ms
56,968 KB
testcase_01 AC 282 ms
56,800 KB
testcase_02 AC 292 ms
56,904 KB
testcase_03 AC 289 ms
56,872 KB
testcase_04 AC 281 ms
56,852 KB
testcase_05 AC 288 ms
56,916 KB
testcase_06 AC 293 ms
56,964 KB
testcase_07 AC 291 ms
57,012 KB
testcase_08 AC 285 ms
56,900 KB
testcase_09 AC 291 ms
56,776 KB
testcase_10 AC 291 ms
56,820 KB
testcase_11 AC 286 ms
56,864 KB
testcase_12 AC 292 ms
56,984 KB
testcase_13 AC 292 ms
57,020 KB
testcase_14 AC 287 ms
56,868 KB
testcase_15 AC 288 ms
56,820 KB
testcase_16 AC 287 ms
56,972 KB
testcase_17 AC 284 ms
57,028 KB
testcase_18 AC 280 ms
56,928 KB
testcase_19 AC 284 ms
56,812 KB
testcase_20 AC 288 ms
56,964 KB
testcase_21 AC 281 ms
56,904 KB
testcase_22 AC 279 ms
57,024 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) = p994()
         ^

ソースコード

diff #

fun main(args: Array<String>) = p994()

fun p994() {
    val (n, k) = readLine()!!.split(' ').map { it.toInt() }

    val answer = if (k > n) -1 else Math.max(k - 1, 0)

    println(answer)
}
0