結果

問題 No.63 ポッキーゲーム
ユーザー 💕💖💞💕💖💞
提出日時 2017-07-01 08:36:14
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 290 ms / 5,000 ms
コード長 267 bytes
コンパイル時間 9,359 ms
コンパイル使用メモリ 430,608 KB
実行使用メモリ 56,980 KB
最終ジャッジ日時 2024-04-30 15:07:40
合計ジャッジ時間 16,272 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 261 ms
56,852 KB
testcase_01 AC 271 ms
56,924 KB
testcase_02 AC 259 ms
56,980 KB
testcase_03 AC 260 ms
56,836 KB
testcase_04 AC 263 ms
56,828 KB
testcase_05 AC 268 ms
56,856 KB
testcase_06 AC 268 ms
56,912 KB
testcase_07 AC 261 ms
56,916 KB
testcase_08 AC 263 ms
56,848 KB
testcase_09 AC 267 ms
56,832 KB
testcase_10 AC 278 ms
56,956 KB
testcase_11 AC 265 ms
56,824 KB
testcase_12 AC 265 ms
56,936 KB
testcase_13 AC 266 ms
56,912 KB
testcase_14 AC 260 ms
56,844 KB
testcase_15 AC 263 ms
56,904 KB
testcase_16 AC 273 ms
56,824 KB
testcase_17 AC 270 ms
56,880 KB
testcase_18 AC 279 ms
56,848 KB
testcase_19 AC 283 ms
56,976 KB
testcase_20 AC 282 ms
56,856 KB
testcase_21 AC 290 ms
56,836 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:11: warning: parameter 'args' is never used
fun main( args : Array<String> ) { 
          ^

ソースコード

diff #

fun main( args : Array<String> ) { 
  readLine()!!
    .split(" ")
    .map { it.toInt() }
    .let {
      val (a, b) = it
      val c = b * 2
      when {
        a % c == 0 -> a/c - 1
        else       -> a/c 
      }.let {
        println(it * b)
      }
    }
}
0