結果

問題 No.63 ポッキーゲーム
ユーザー 💕💖💞
提出日時 2017-07-01 08:36:14
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 300 ms / 5,000 ms
コード長 267 bytes
コンパイル時間 9,781 ms
コンパイル使用メモリ 435,180 KB
実行使用メモリ 57,056 KB
最終ジャッジ日時 2024-11-20 10:59:09
合計ジャッジ時間 16,893 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
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