結果

問題 No.586 ダブルブッキング
ユーザー tamura2004tamura2004
提出日時 2020-05-10 14:20:08
言語 Ruby
(3.3.0)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 759 ms
コンパイル使用メモリ 11,328 KB
実行使用メモリ 15,160 KB
最終ジャッジ日時 2023-09-21 23:26:53
合計ジャッジ時間 2,344 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
15,140 KB
testcase_01 AC 92 ms
15,096 KB
testcase_02 AC 90 ms
15,104 KB
testcase_03 AC 89 ms
15,160 KB
testcase_04 AC 89 ms
15,068 KB
testcase_05 AC 90 ms
15,144 KB
testcase_06 AC 84 ms
15,020 KB
testcase_07 AC 85 ms
15,020 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

p1 = gets.to_i
p2 = gets.to_i
n = gets.to_i
a = Array.new(n){ gets.to_i }

cnt = Hash.new(0)
ans = 0
a.each do |r|
  if cnt[r] > 0
    ans += 1
  else
    cnt[r] = 1
  end
end
ans *= p1 + p2
puts ans
0