結果

問題 No.1738 What's in the box?
ユーザー irumo8202
提出日時 2022-01-27 19:07:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 204 bytes
コンパイル時間 248 ms
コンパイル使用メモリ 81,732 KB
実行使用メモリ 58,624 KB
最終ジャッジ日時 2024-12-25 22:53:41
合計ジャッジ時間 5,041 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 70
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
W = list(map(int, input().split()))

ans = [0] * int(N)
if M == 0:
    print(*ans)
    exit()

sumW = sum(W)
for i in range(N):
    ans[i] = W[i] * M // sumW

print(*ans)
0