結果

問題 No.1071 ベホマラー
ユーザー umashi-pan-tnokk093numashi-pan-tnokk093n
提出日時 2020-06-06 11:58:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 310 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 19,280 KB
最終ジャッジ日時 2023-08-25 00:20:06
合計ジャッジ時間 4,828 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 17 ms
7,860 KB
testcase_05 AC 17 ms
7,860 KB
testcase_06 AC 17 ms
7,832 KB
testcase_07 AC 18 ms
7,884 KB
testcase_08 AC 17 ms
7,840 KB
testcase_09 AC 18 ms
7,864 KB
testcase_10 WA -
testcase_11 AC 161 ms
16,848 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k,x,y =map(int,input().split())#behoimi x behoma y
a=list(map(int,input().split()))
a.sort()
kaisu=[]
done=0
ans=0
for i in a:
    j=i//k
    if i%k!=0:
        j+=1
    kaisu.append(j)

for i in kaisu:
    i-=done
    if y<n*x:
        done+=i
        ans+=y*i
    else:
        ans+=x*i
    n-=1
print(ans)
0