結果

問題 No.1738 What's in the box?
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2021-11-21 01:56:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 362 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 10,532 KB
実行使用メモリ 8,408 KB
最終ジャッジ日時 2023-09-03 16:16:14
合計ジャッジ時間 5,100 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,768 KB
testcase_01 AC 17 ms
7,808 KB
testcase_02 AC 16 ms
7,824 KB
testcase_03 AC 24 ms
8,264 KB
testcase_04 AC 25 ms
8,380 KB
testcase_05 AC 24 ms
8,408 KB
testcase_06 AC 24 ms
8,188 KB
testcase_07 AC 25 ms
8,244 KB
testcase_08 AC 24 ms
8,208 KB
testcase_09 WA -
testcase_10 AC 24 ms
8,348 KB
testcase_11 WA -
testcase_12 AC 24 ms
8,332 KB
testcase_13 AC 16 ms
7,732 KB
testcase_14 AC 15 ms
7,752 KB
testcase_15 AC 16 ms
7,732 KB
testcase_16 AC 16 ms
7,796 KB
testcase_17 AC 16 ms
7,964 KB
testcase_18 AC 16 ms
7,864 KB
testcase_19 WA -
testcase_20 AC 16 ms
7,844 KB
testcase_21 AC 17 ms
7,800 KB
testcase_22 WA -
testcase_23 AC 15 ms
7,968 KB
testcase_24 AC 18 ms
7,764 KB
testcase_25 AC 17 ms
7,816 KB
testcase_26 WA -
testcase_27 AC 16 ms
7,872 KB
testcase_28 AC 16 ms
7,756 KB
testcase_29 AC 16 ms
7,972 KB
testcase_30 AC 16 ms
7,912 KB
testcase_31 RE -
testcase_32 RE -
testcase_33 AC 21 ms
7,768 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 23 ms
8,300 KB
testcase_37 AC 23 ms
8,300 KB
testcase_38 AC 24 ms
8,196 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 23 ms
8,300 KB
testcase_43 AC 25 ms
8,240 KB
testcase_44 WA -
testcase_45 AC 24 ms
8,208 KB
testcase_46 AC 24 ms
8,360 KB
testcase_47 AC 23 ms
8,400 KB
testcase_48 AC 24 ms
8,232 KB
testcase_49 AC 24 ms
8,232 KB
testcase_50 AC 24 ms
8,212 KB
testcase_51 AC 25 ms
8,212 KB
testcase_52 AC 25 ms
8,240 KB
testcase_53 AC 15 ms
7,844 KB
testcase_54 AC 16 ms
7,912 KB
testcase_55 WA -
testcase_56 AC 17 ms
7,840 KB
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 AC 15 ms
7,840 KB
testcase_63 WA -
testcase_64 WA -
testcase_65 WA -
testcase_66 WA -
testcase_67 WA -
testcase_68 WA -
testcase_69 WA -
testcase_70 AC 16 ms
7,864 KB
testcase_71 WA -
testcase_72 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
W = list(map(int,input().split()))
m = sum(W)/M
ans = [0]*N
def f(x):
    s = 0
    t = 10**9
    
    def is_ok(y):
        return y*m <= x
        
    while t-s>1:
        mid = (t+s)//2
        if is_ok(mid):
            s = mid
        else:
            t = mid
    return s
for i in range(N):
    ans[i] = f(W[i])
print(*ans)
0