結果
問題 | No.1738 What's in the box? |
ユーザー |
|
提出日時 | 2021-11-12 22:24:22 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 216 bytes |
コンパイル時間 | 1,622 ms |
コンパイル使用メモリ | 176,732 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-22 13:16:31 |
合計ジャッジ時間 | 2,832 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 70 |
ソースコード
import std; void main(){ auto s=readln.split.to!(long[]); auto N=s[0]; auto M=s[1]; auto W=readln.split.to!(long[]); auto w=W.sum; if(w>0){ W=W.map!(x=>x*M/w).array; } writeln(W.to!(string[]).join(" ")); }