結果
問題 |
No.1738 What's in the box?
|
ユーザー |
![]() |
提出日時 | 2025-07-03 03:04:26 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 9 ms / 2,000 ms |
コード長 | 290 bytes |
コンパイル時間 | 13,235 ms |
コンパイル使用メモリ | 254,540 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-07-03 03:04:42 |
合計ジャッジ時間 | 14,665 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 70 |
ソースコード
package main import . "fmt" func main() { var n, m int Scan(&n, &m) ws := make([]int, n) sum := 0 for i := range ws { Scan(&ws[i]) sum += ws[i] } ans := make([]any, n) for i, w := range ws { if sum > 0 { ans[i] = w*m/sum } else { ans[i] = 0 } } Println(ans...) }