結果

問題 No.1738 What's in the box?
ユーザー shinichishinichi
提出日時 2021-11-13 19:53:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 326 ms / 2,000 ms
コード長 398 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 93,724 KB
最終ジャッジ日時 2023-08-18 14:32:49
合計ジャッジ時間 22,320 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 209 ms
89,272 KB
testcase_01 AC 209 ms
89,252 KB
testcase_02 AC 203 ms
89,052 KB
testcase_03 AC 316 ms
92,860 KB
testcase_04 AC 316 ms
92,808 KB
testcase_05 AC 310 ms
93,300 KB
testcase_06 AC 319 ms
93,516 KB
testcase_07 AC 319 ms
93,036 KB
testcase_08 AC 314 ms
93,396 KB
testcase_09 AC 317 ms
93,132 KB
testcase_10 AC 316 ms
93,260 KB
testcase_11 AC 305 ms
93,016 KB
testcase_12 AC 326 ms
93,624 KB
testcase_13 AC 213 ms
89,052 KB
testcase_14 AC 216 ms
89,156 KB
testcase_15 AC 214 ms
89,240 KB
testcase_16 AC 221 ms
89,164 KB
testcase_17 AC 213 ms
89,220 KB
testcase_18 AC 213 ms
89,292 KB
testcase_19 AC 209 ms
89,044 KB
testcase_20 AC 213 ms
88,992 KB
testcase_21 AC 227 ms
91,880 KB
testcase_22 AC 205 ms
89,156 KB
testcase_23 AC 208 ms
89,200 KB
testcase_24 AC 248 ms
92,304 KB
testcase_25 AC 242 ms
91,764 KB
testcase_26 AC 209 ms
89,012 KB
testcase_27 AC 206 ms
88,992 KB
testcase_28 AC 206 ms
89,236 KB
testcase_29 AC 216 ms
89,004 KB
testcase_30 AC 208 ms
89,044 KB
testcase_31 AC 207 ms
88,864 KB
testcase_32 AC 210 ms
89,276 KB
testcase_33 AC 290 ms
92,788 KB
testcase_34 AC 302 ms
93,112 KB
testcase_35 AC 291 ms
92,980 KB
testcase_36 AC 311 ms
93,344 KB
testcase_37 AC 300 ms
93,056 KB
testcase_38 AC 312 ms
92,996 KB
testcase_39 AC 310 ms
93,448 KB
testcase_40 AC 321 ms
93,724 KB
testcase_41 AC 317 ms
93,104 KB
testcase_42 AC 317 ms
93,192 KB
testcase_43 AC 323 ms
93,348 KB
testcase_44 AC 317 ms
93,180 KB
testcase_45 AC 307 ms
93,280 KB
testcase_46 AC 318 ms
93,224 KB
testcase_47 AC 316 ms
93,580 KB
testcase_48 AC 323 ms
93,144 KB
testcase_49 AC 310 ms
93,320 KB
testcase_50 AC 314 ms
93,216 KB
testcase_51 AC 317 ms
93,300 KB
testcase_52 AC 317 ms
92,828 KB
testcase_53 AC 212 ms
89,260 KB
testcase_54 AC 214 ms
89,040 KB
testcase_55 AC 213 ms
89,292 KB
testcase_56 AC 220 ms
91,240 KB
testcase_57 AC 206 ms
88,900 KB
testcase_58 AC 208 ms
89,224 KB
testcase_59 AC 208 ms
89,156 KB
testcase_60 AC 209 ms
89,052 KB
testcase_61 AC 208 ms
89,200 KB
testcase_62 AC 208 ms
89,000 KB
testcase_63 AC 210 ms
89,232 KB
testcase_64 AC 202 ms
89,264 KB
testcase_65 AC 205 ms
89,112 KB
testcase_66 AC 204 ms
89,280 KB
testcase_67 AC 208 ms
89,268 KB
testcase_68 AC 206 ms
89,336 KB
testcase_69 AC 210 ms
89,168 KB
testcase_70 AC 212 ms
89,052 KB
testcase_71 AC 215 ms
89,048 KB
testcase_72 AC 208 ms
89,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import decimal



N, M = map(lambda x: decimal.Decimal(x), input().split())
W = list(map(lambda x:decimal.Decimal(x), input().split()))
if M == 0:
    print(*[0 for _ in range(int(N))])
    exit()
total_weight = sum(W)
ball_weight = decimal.Decimal(total_weight / M)

result = []
eps = decimal.Decimal(0.0001)
for w in W:
    cnt = w / ball_weight + eps
    result.append(int(cnt))

print(*result)
0