結果

問題 No.586 ダブルブッキング
ユーザー とばり
提出日時 2018-09-22 09:27:49
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 330 bytes
コンパイル時間 3,150 ms
コンパイル使用メモリ 63,872 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 04:41:04
合計ジャッジ時間 3,717 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

from strutils import parseInt

let
  P1 = parseInt(readLine(stdin))
  P2 = parseInt(readLine(stdin))
  N  = parseInt(readLine(stdin))

var
  R: array[0..99, int]
  ans = 0

for i in countup(0, N - 1):
  R[i] = parseInt(readLine(stdin))

  for j in countup(0, i - 1):
    if R[i] == R[j]:
      ans += P1 + P2
      break

echo ans
0