結果

問題 No.63 ポッキーゲーム
ユーザー komkomhkomkomh
提出日時 2019-04-17 08:16:48
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 323 ms / 5,000 ms
コード長 243 bytes
コンパイル時間 11,955 ms
コンパイル使用メモリ 433,516 KB
実行使用メモリ 56,968 KB
最終ジャッジ日時 2024-04-30 20:18:12
合計ジャッジ時間 19,669 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 306 ms
56,808 KB
testcase_01 AC 304 ms
56,944 KB
testcase_02 AC 304 ms
56,952 KB
testcase_03 AC 304 ms
56,796 KB
testcase_04 AC 308 ms
56,960 KB
testcase_05 AC 302 ms
56,824 KB
testcase_06 AC 304 ms
56,824 KB
testcase_07 AC 311 ms
56,956 KB
testcase_08 AC 309 ms
56,880 KB
testcase_09 AC 303 ms
56,944 KB
testcase_10 AC 307 ms
56,920 KB
testcase_11 AC 308 ms
56,968 KB
testcase_12 AC 305 ms
56,968 KB
testcase_13 AC 302 ms
56,880 KB
testcase_14 AC 302 ms
56,944 KB
testcase_15 AC 305 ms
56,924 KB
testcase_16 AC 323 ms
56,832 KB
testcase_17 AC 309 ms
56,956 KB
testcase_18 AC 303 ms
56,856 KB
testcase_19 AC 303 ms
56,904 KB
testcase_20 AC 303 ms
56,852 KB
testcase_21 AC 301 ms
56,936 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