結果

問題 No.1738 What's in the box?
ユーザー customfolkcustomfolk
提出日時 2021-11-12 21:51:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 1,065 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 87,356 KB
実行使用メモリ 77,880 KB
最終ジャッジ日時 2023-08-17 01:02:35
合計ジャッジ時間 12,244 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
73,544 KB
testcase_01 AC 123 ms
73,400 KB
testcase_02 AC 125 ms
73,428 KB
testcase_03 AC 133 ms
77,468 KB
testcase_04 AC 132 ms
77,584 KB
testcase_05 AC 130 ms
77,492 KB
testcase_06 AC 128 ms
77,588 KB
testcase_07 AC 128 ms
77,316 KB
testcase_08 AC 128 ms
77,172 KB
testcase_09 AC 128 ms
77,412 KB
testcase_10 AC 131 ms
77,208 KB
testcase_11 AC 131 ms
77,308 KB
testcase_12 AC 128 ms
77,320 KB
testcase_13 AC 125 ms
73,052 KB
testcase_14 AC 126 ms
73,204 KB
testcase_15 AC 128 ms
73,536 KB
testcase_16 AC 126 ms
73,048 KB
testcase_17 AC 125 ms
73,440 KB
testcase_18 AC 124 ms
73,312 KB
testcase_19 AC 125 ms
73,100 KB
testcase_20 AC 125 ms
73,432 KB
testcase_21 AC 124 ms
73,188 KB
testcase_22 AC 123 ms
73,228 KB
testcase_23 AC 124 ms
73,316 KB
testcase_24 AC 126 ms
73,528 KB
testcase_25 AC 125 ms
73,316 KB
testcase_26 AC 124 ms
73,436 KB
testcase_27 AC 121 ms
73,548 KB
testcase_28 AC 122 ms
73,280 KB
testcase_29 AC 124 ms
73,296 KB
testcase_30 AC 123 ms
73,208 KB
testcase_31 AC 126 ms
73,500 KB
testcase_32 AC 130 ms
73,388 KB
testcase_33 AC 127 ms
73,204 KB
testcase_34 AC 128 ms
77,412 KB
testcase_35 AC 128 ms
73,208 KB
testcase_36 AC 129 ms
73,208 KB
testcase_37 AC 127 ms
73,100 KB
testcase_38 AC 130 ms
77,576 KB
testcase_39 AC 127 ms
73,404 KB
testcase_40 AC 131 ms
77,400 KB
testcase_41 AC 130 ms
77,712 KB
testcase_42 AC 132 ms
77,780 KB
testcase_43 AC 132 ms
77,792 KB
testcase_44 AC 133 ms
77,256 KB
testcase_45 AC 131 ms
77,316 KB
testcase_46 AC 131 ms
77,332 KB
testcase_47 AC 131 ms
77,712 KB
testcase_48 AC 133 ms
77,520 KB
testcase_49 AC 134 ms
77,712 KB
testcase_50 AC 135 ms
77,880 KB
testcase_51 AC 131 ms
77,608 KB
testcase_52 AC 133 ms
77,556 KB
testcase_53 AC 125 ms
73,280 KB
testcase_54 AC 124 ms
73,272 KB
testcase_55 AC 126 ms
73,184 KB
testcase_56 AC 124 ms
73,104 KB
testcase_57 AC 124 ms
73,540 KB
testcase_58 AC 126 ms
73,204 KB
testcase_59 AC 126 ms
73,120 KB
testcase_60 AC 125 ms
73,320 KB
testcase_61 AC 126 ms
73,424 KB
testcase_62 AC 125 ms
73,376 KB
testcase_63 AC 124 ms
73,440 KB
testcase_64 AC 125 ms
73,320 KB
testcase_65 AC 124 ms
73,484 KB
testcase_66 AC 123 ms
73,476 KB
testcase_67 AC 126 ms
73,556 KB
testcase_68 AC 126 ms
73,340 KB
testcase_69 AC 125 ms
73,304 KB
testcase_70 AC 124 ms
73,440 KB
testcase_71 AC 124 ms
73,088 KB
testcase_72 AC 124 ms
73,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict, deque, Counter
from heapq import heapify, heappop, heappush
import math
from copy import deepcopy
from itertools import combinations, permutations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right

import sys

def input():
    return sys.stdin.readline().rstrip()
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getListGraph():
    return list(map(lambda x:int(x) - 1, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]

mod = 10 ** 9 + 7
MOD = 998244353
sys.setrecursionlimit(10000000)
inf = float('inf')
eps = 10 ** (-15)
dy = [0, 1, 0, -1]
dx = [1, 0, -1, 0]

#############
# Main Code #
#############

"""
ボールの中身を
ボールの重さは全てakg(有理数)

"""

N, M = getNM()
W = getList()
ans = [0] * N
all = sum(W)
if all == 0:
    print(*[0 for i in range(N)])
    exit()
for i in range(N):
    ans[i] = (M * W[i]) // all
print(*ans)
0