結果

問題 No.586 ダブルブッキング
ユーザー 💕💖💞💕💖💞
提出日時 2017-12-24 22:22:50
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 302 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 10,807 ms
コンパイル使用メモリ 442,040 KB
実行使用メモリ 56,860 KB
最終ジャッジ日時 2024-04-30 16:46:51
合計ジャッジ時間 13,995 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 285 ms
56,576 KB
testcase_01 AC 292 ms
56,580 KB
testcase_02 AC 292 ms
56,604 KB
testcase_03 AC 301 ms
56,612 KB
testcase_04 AC 288 ms
56,672 KB
testcase_05 AC 302 ms
56,860 KB
testcase_06 AC 298 ms
56,744 KB
testcase_07 AC 297 ms
56,564 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>){
         ^

ソースコード

diff #

fun main(args:Array<String>){
  val (a,b) = (0..1).map { readLine()!!.toInt() }
  val n = readLine()!!.toInt()
  val no_freq = mutableMapOf<String,Int>()
  (1..n).map {
    val no = readLine()!!
    if(no_freq.get(no) == null )
      no_freq[no] = 0
    no_freq[no] = no_freq[no]!! + 1
  }
  val m = (a+b)*(no_freq.values.sum() - no_freq.size)
  println(m)
}
0