結果

問題 No.586 ダブルブッキング
ユーザー maimai
提出日時 2017-11-03 22:28:52
言語 Ruby
(3.3.0)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 132 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 11,500 KB
実行使用メモリ 15,240 KB
最終ジャッジ日時 2023-08-14 16:57:10
合計ジャッジ時間 1,445 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,132 KB
testcase_01 AC 81 ms
15,032 KB
testcase_02 AC 82 ms
15,176 KB
testcase_03 AC 80 ms
15,136 KB
testcase_04 AC 82 ms
15,204 KB
testcase_05 AC 82 ms
15,032 KB
testcase_06 AC 81 ms
15,136 KB
testcase_07 AC 80 ms
15,240 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:4: warning: assigned but unused variable - n
Main.rb:7: warning: assigned but unused variable - m
Syntax OK

ソースコード

diff #

def ascan; gets.split.map(&:to_i);end

a = *$<
p1,p2,n,*r = a.map(&:to_i)

d = r.size - r.uniq.size
m = d-r.uniq.size

p p1*d + p2*d
0