結果

問題 No.63 ポッキーゲーム
ユーザー komkomhkomkomh
提出日時 2019-04-17 08:16:48
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 296 ms / 5,000 ms
コード長 243 bytes
コンパイル時間 12,396 ms
コンパイル使用メモリ 420,576 KB
実行使用メモリ 53,360 KB
最終ジャッジ日時 2023-08-13 01:44:56
合計ジャッジ時間 20,816 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 283 ms
53,000 KB
testcase_01 AC 286 ms
52,804 KB
testcase_02 AC 286 ms
52,932 KB
testcase_03 AC 291 ms
53,040 KB
testcase_04 AC 286 ms
52,952 KB
testcase_05 AC 287 ms
52,944 KB
testcase_06 AC 286 ms
52,904 KB
testcase_07 AC 291 ms
52,956 KB
testcase_08 AC 284 ms
53,232 KB
testcase_09 AC 286 ms
52,888 KB
testcase_10 AC 296 ms
52,816 KB
testcase_11 AC 288 ms
52,956 KB
testcase_12 AC 288 ms
52,976 KB
testcase_13 AC 290 ms
53,012 KB
testcase_14 AC 291 ms
53,288 KB
testcase_15 AC 287 ms
53,280 KB
testcase_16 AC 285 ms
53,360 KB
testcase_17 AC 286 ms
52,920 KB
testcase_18 AC 286 ms
53,012 KB
testcase_19 AC 285 ms
53,052 KB
testcase_20 AC 287 ms
52,960 KB
testcase_21 AC 288 ms
53,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder

fun main() {
    val (l, k) = readLine()!!.split(" ").map(String::toInt)
    val forward = k * 2
    val count = l / forward
    var nonTouchCount = if (l % forward == 0) count - 1 else count
    println(k * nonTouchCount)
}
0