結果

問題 No.791 うし数列
ユーザー 💕💖💞💕💖💞
提出日時 2019-05-06 16:15:20
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 262 bytes
コンパイル時間 9,404 ms
コンパイル使用メモリ 434,892 KB
実行使用メモリ 57,108 KB
最終ジャッジ日時 2024-04-30 20:30:45
合計ジャッジ時間 15,077 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 276 ms
56,844 KB
testcase_01 AC 261 ms
57,084 KB
testcase_02 WA -
testcase_03 AC 256 ms
56,964 KB
testcase_04 AC 269 ms
56,996 KB
testcase_05 AC 264 ms
56,852 KB
testcase_06 AC 276 ms
56,800 KB
testcase_07 AC 274 ms
57,068 KB
testcase_08 AC 266 ms
57,084 KB
testcase_09 AC 264 ms
57,108 KB
testcase_10 AC 265 ms
56,976 KB
testcase_11 AC 263 ms
57,096 KB
testcase_12 AC 266 ms
56,848 KB
testcase_13 AC 274 ms
56,848 KB
testcase_14 AC 275 ms
56,828 KB
testcase_15 AC 267 ms
56,844 KB
testcase_16 AC 267 ms
57,076 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

fun main(args:Array<String>) {
    val ml = readLine()!!.toList().map { it.toString().toInt() }.toMutableList()
    val head = ml[0]
    ml.removeAt(0)
    when {
        head == 1 && ml.all { it == 3 } -> ml.size
        else ->  -1
    }.let { println(it) }
}
0