結果

問題 No.586 ダブルブッキング
ユーザー ichibanshiboriichibanshibori
提出日時 2018-05-03 18:02:38
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 279 ms / 2,000 ms
コード長 378 bytes
コンパイル時間 12,849 ms
コンパイル使用メモリ 430,740 KB
実行使用メモリ 56,800 KB
最終ジャッジ日時 2024-04-30 18:29:13
合計ジャッジ時間 13,227 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 260 ms
56,800 KB
testcase_01 AC 264 ms
56,780 KB
testcase_02 AC 259 ms
56,592 KB
testcase_03 AC 266 ms
56,796 KB
testcase_04 AC 272 ms
56,720 KB
testcase_05 AC 279 ms
56,688 KB
testcase_06 AC 278 ms
56,708 KB
testcase_07 AC 259 ms
56,760 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args : Array<String>) {
         ^

ソースコード

diff #

fun main(args : Array<String>) {
	val p1 = (readLine() ?: "").run { toInt() }
	val p2 = (readLine() ?: "").run { toInt() }
	val n = (readLine() ?: "").run { toInt() }
	val rLst = IntRange(1, n).map { readLine() ?: "" }.map { it.toInt() }

	val dupNum = rLst
		.groupBy { it }
		.filter { it.value.size > 1 }
		.map { it.value.size - 1 }
		.sum()
	
	println((p1 + p2) * dupNum)
}
0