結果

問題 No.1738 What's in the box?
ユーザー shinichishinichi
提出日時 2021-11-13 19:52:21
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 387 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 82,244 KB
実行使用メモリ 83,328 KB
最終ジャッジ日時 2024-05-05 19:46:30
合計ジャッジ時間 13,678 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
80,036 KB
testcase_01 AC 116 ms
79,744 KB
testcase_02 AC 118 ms
79,996 KB
testcase_03 AC 221 ms
83,072 KB
testcase_04 AC 215 ms
83,096 KB
testcase_05 AC 213 ms
82,944 KB
testcase_06 AC 218 ms
82,964 KB
testcase_07 AC 215 ms
83,076 KB
testcase_08 AC 208 ms
82,944 KB
testcase_09 AC 216 ms
83,016 KB
testcase_10 AC 208 ms
83,012 KB
testcase_11 AC 205 ms
83,224 KB
testcase_12 AC 246 ms
82,944 KB
testcase_13 AC 119 ms
80,052 KB
testcase_14 AC 113 ms
80,128 KB
testcase_15 AC 117 ms
80,100 KB
testcase_16 AC 116 ms
80,128 KB
testcase_17 AC 114 ms
80,000 KB
testcase_18 AC 115 ms
80,172 KB
testcase_19 AC 119 ms
80,000 KB
testcase_20 AC 115 ms
80,000 KB
testcase_21 AC 130 ms
81,744 KB
testcase_22 AC 115 ms
79,992 KB
testcase_23 AC 117 ms
79,872 KB
testcase_24 AC 149 ms
81,920 KB
testcase_25 AC 156 ms
81,792 KB
testcase_26 AC 119 ms
80,128 KB
testcase_27 AC 117 ms
79,872 KB
testcase_28 AC 114 ms
80,128 KB
testcase_29 AC 113 ms
79,744 KB
testcase_30 AC 120 ms
80,000 KB
testcase_31 RE -
testcase_32 RE -
testcase_33 AC 181 ms
82,688 KB
testcase_34 AC 206 ms
83,184 KB
testcase_35 AC 190 ms
82,944 KB
testcase_36 AC 210 ms
82,816 KB
testcase_37 AC 216 ms
82,816 KB
testcase_38 AC 228 ms
82,944 KB
testcase_39 AC 220 ms
83,072 KB
testcase_40 AC 218 ms
83,072 KB
testcase_41 AC 214 ms
82,940 KB
testcase_42 AC 210 ms
83,328 KB
testcase_43 AC 225 ms
83,072 KB
testcase_44 AC 211 ms
82,976 KB
testcase_45 AC 206 ms
83,072 KB
testcase_46 AC 216 ms
83,072 KB
testcase_47 AC 237 ms
83,072 KB
testcase_48 AC 242 ms
83,072 KB
testcase_49 AC 218 ms
83,100 KB
testcase_50 AC 204 ms
82,944 KB
testcase_51 AC 211 ms
83,072 KB
testcase_52 AC 222 ms
83,200 KB
testcase_53 AC 115 ms
79,996 KB
testcase_54 AC 120 ms
80,256 KB
testcase_55 AC 121 ms
80,000 KB
testcase_56 AC 137 ms
81,368 KB
testcase_57 AC 125 ms
79,872 KB
testcase_58 AC 130 ms
80,128 KB
testcase_59 AC 125 ms
80,128 KB
testcase_60 AC 125 ms
80,256 KB
testcase_61 AC 124 ms
80,128 KB
testcase_62 AC 124 ms
80,000 KB
testcase_63 AC 124 ms
80,000 KB
testcase_64 AC 124 ms
80,128 KB
testcase_65 AC 125 ms
80,128 KB
testcase_66 AC 124 ms
80,128 KB
testcase_67 AC 127 ms
80,128 KB
testcase_68 AC 123 ms
80,128 KB
testcase_69 AC 126 ms
79,744 KB
testcase_70 AC 125 ms
80,000 KB
testcase_71 AC 122 ms
80,000 KB
testcase_72 AC 117 ms
80,000 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))])
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