結果

問題 No.706 多眼生物の調査
ユーザー 💕💖💞💕💖💞
提出日時 2018-07-22 00:34:56
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 218 bytes
コンパイル時間 10,274 ms
コンパイル使用メモリ 441,548 KB
実行使用メモリ 74,916 KB
最終ジャッジ日時 2024-04-30 19:01:31
合計ジャッジ時間 13,856 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 274 ms
56,900 KB
testcase_01 AC 282 ms
57,040 KB
testcase_02 AC 280 ms
56,920 KB
testcase_03 AC 307 ms
57,204 KB
testcase_04 AC 342 ms
57,384 KB
testcase_05 AC 452 ms
65,484 KB
testcase_06 WA -
testcase_07 AC 281 ms
57,020 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^
Main.kt:2:163: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Pair<Int, Int>
  val dd = (1..readLine()!!.toInt()).map { readLine()!!.toList().filter { it == '^' }.size }.groupBy { it }.map { (k,vs) -> Pair(k, vs.size) }.maxBy { it.second }!!.first
                                                                                                                                                                  ^

ソースコード

diff #

fun main(args:Array<String>) {
  val dd = (1..readLine()!!.toInt()).map { readLine()!!.toList().filter { it == '^' }.size }.groupBy { it }.map { (k,vs) -> Pair(k, vs.size) }.maxBy { it.second }!!.first
  println(dd)
}
0