結果

問題 No.63 ポッキーゲーム
ユーザー da_louisda_louis
提出日時 2020-02-07 00:59:17
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 543 ms / 5,000 ms
コード長 263 bytes
コンパイル時間 13,577 ms
コンパイル使用メモリ 440,980 KB
実行使用メモリ 54,396 KB
最終ジャッジ日時 2023-10-25 22:55:01
合計ジャッジ時間 20,536 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 297 ms
54,328 KB
testcase_01 AC 299 ms
54,344 KB
testcase_02 AC 296 ms
54,344 KB
testcase_03 AC 297 ms
54,344 KB
testcase_04 AC 296 ms
54,344 KB
testcase_05 AC 296 ms
54,344 KB
testcase_06 AC 295 ms
54,344 KB
testcase_07 AC 302 ms
54,384 KB
testcase_08 AC 315 ms
54,340 KB
testcase_09 AC 300 ms
54,368 KB
testcase_10 AC 309 ms
54,368 KB
testcase_11 AC 542 ms
54,396 KB
testcase_12 AC 308 ms
54,388 KB
testcase_13 AC 543 ms
54,392 KB
testcase_14 AC 308 ms
54,372 KB
testcase_15 AC 309 ms
54,384 KB
testcase_16 AC 304 ms
54,392 KB
testcase_17 AC 529 ms
54,380 KB
testcase_18 AC 305 ms
54,388 KB
testcase_19 AC 333 ms
54,388 KB
testcase_20 AC 306 ms
54,392 KB
testcase_21 AC 309 ms
54,392 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

fun main(args: Array<String>) {
    p134()
}

fun p134() {
    val (l, k) = readLine()!!.split(' ').map { it.toLong() }

    var remain = l
    var answer = 0L

    while (remain > 2 * k) {
        answer += k
        remain -= 2 * k
    }

    println(answer)
}
0