結果

問題 No.582 キャンディー・ボックス3
ユーザー 💕💖💞💕💖💞
提出日時 2018-03-07 21:50:10
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 344 bytes
コンパイル時間 11,724 ms
コンパイル使用メモリ 427,328 KB
実行使用メモリ 57,156 KB
最終ジャッジ日時 2024-04-30 17:10:05
合計ジャッジ時間 15,936 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 262 ms
56,860 KB
testcase_01 AC 260 ms
56,952 KB
testcase_02 AC 262 ms
57,012 KB
testcase_03 AC 265 ms
56,952 KB
testcase_04 AC 260 ms
56,956 KB
testcase_05 AC 264 ms
56,772 KB
testcase_06 WA -
testcase_07 AC 262 ms
56,812 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 264 ms
56,844 KB
testcase_12 AC 266 ms
56,816 KB
testcase_13 AC 265 ms
56,984 KB
testcase_14 AC 263 ms
56,972 KB
testcase_15 AC 267 ms
56,976 KB
testcase_16 WA -
testcase_17 AC 276 ms
57,132 KB
testcase_18 AC 273 ms
57,092 KB
testcase_19 AC 287 ms
57,156 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

fun main(args:Array<String>) {
  readLine()

  val es = readLine()!!.split(" ").map { it.toInt() }
  val all_size = es.size
  val one_size = es.filter { it == 1 }.size
  val two_size = es.filter { it == 2 }.size

  when {
    all_size == one_size + two_size && one_size % 2 == 1 && two_size == 1 -> "A"
    else -> "B"
  }.let { println(it) }
}
0