結果

問題 No.1738 What's in the box?
ユーザー MasKoaTSMasKoaTS
提出日時 2021-11-12 21:55:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 258 ms / 2,000 ms
コード長 789 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 83,736 KB
最終ジャッジ日時 2023-08-17 01:15:42
合計ジャッジ時間 20,706 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 246 ms
83,028 KB
testcase_01 AC 240 ms
82,976 KB
testcase_02 AC 237 ms
83,044 KB
testcase_03 AC 236 ms
83,616 KB
testcase_04 AC 242 ms
83,600 KB
testcase_05 AC 244 ms
83,664 KB
testcase_06 AC 242 ms
83,656 KB
testcase_07 AC 239 ms
83,592 KB
testcase_08 AC 250 ms
83,556 KB
testcase_09 AC 243 ms
83,600 KB
testcase_10 AC 258 ms
83,656 KB
testcase_11 AC 251 ms
83,664 KB
testcase_12 AC 240 ms
83,540 KB
testcase_13 AC 233 ms
82,972 KB
testcase_14 AC 231 ms
82,740 KB
testcase_15 AC 239 ms
83,096 KB
testcase_16 AC 236 ms
82,852 KB
testcase_17 AC 237 ms
82,924 KB
testcase_18 AC 238 ms
83,036 KB
testcase_19 AC 248 ms
82,912 KB
testcase_20 AC 239 ms
82,884 KB
testcase_21 AC 237 ms
83,112 KB
testcase_22 AC 244 ms
82,972 KB
testcase_23 AC 238 ms
83,052 KB
testcase_24 AC 234 ms
83,096 KB
testcase_25 AC 241 ms
83,096 KB
testcase_26 AC 232 ms
83,012 KB
testcase_27 AC 233 ms
82,988 KB
testcase_28 AC 233 ms
82,968 KB
testcase_29 AC 243 ms
82,852 KB
testcase_30 AC 234 ms
82,996 KB
testcase_31 AC 231 ms
83,056 KB
testcase_32 AC 235 ms
82,924 KB
testcase_33 AC 233 ms
82,920 KB
testcase_34 AC 234 ms
83,516 KB
testcase_35 AC 233 ms
83,088 KB
testcase_36 AC 235 ms
82,848 KB
testcase_37 AC 235 ms
83,048 KB
testcase_38 AC 238 ms
83,356 KB
testcase_39 AC 231 ms
82,928 KB
testcase_40 AC 233 ms
83,608 KB
testcase_41 AC 230 ms
83,352 KB
testcase_42 AC 233 ms
83,496 KB
testcase_43 AC 234 ms
83,688 KB
testcase_44 AC 235 ms
83,652 KB
testcase_45 AC 236 ms
83,688 KB
testcase_46 AC 232 ms
83,736 KB
testcase_47 AC 231 ms
83,652 KB
testcase_48 AC 237 ms
83,552 KB
testcase_49 AC 255 ms
83,640 KB
testcase_50 AC 244 ms
83,636 KB
testcase_51 AC 240 ms
83,688 KB
testcase_52 AC 251 ms
83,692 KB
testcase_53 AC 234 ms
83,076 KB
testcase_54 AC 234 ms
82,916 KB
testcase_55 AC 226 ms
83,016 KB
testcase_56 AC 226 ms
83,092 KB
testcase_57 AC 227 ms
83,048 KB
testcase_58 AC 230 ms
83,108 KB
testcase_59 AC 225 ms
82,740 KB
testcase_60 AC 228 ms
82,852 KB
testcase_61 AC 231 ms
82,900 KB
testcase_62 AC 235 ms
82,920 KB
testcase_63 AC 237 ms
83,060 KB
testcase_64 AC 240 ms
82,916 KB
testcase_65 AC 251 ms
82,732 KB
testcase_66 AC 249 ms
82,948 KB
testcase_67 AC 246 ms
82,968 KB
testcase_68 AC 253 ms
82,928 KB
testcase_69 AC 235 ms
82,924 KB
testcase_70 AC 233 ms
82,912 KB
testcase_71 AC 225 ms
83,052 KB
testcase_72 AC 231 ms
83,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools as iter
import collections as coll
import heapq as hq
import bisect as bis
from decimal import Decimal as dec
from copy import deepcopy as dcopy
import math
import sys
sys.setrecursionlimit(10**6)
def input():
    return sys.stdin.readline().rstrip()
def getN():
	return int(sys.stdin.readline())
def getNs():
	return map(int,sys.stdin.readline().split())
def getList():
	return list(map(int,sys.stdin.readline().split()))
def strinps(n):
	return [sys.stdin.readline().rstrip() for _ in range(n)]
pi = 3.141592653589793
mod = 10**9+7
MOD = 998244353
INF = math.inf
dx = [1,0,-1,0];	dy = [0,1,0,-1]


"""
Main Code
"""

n,m = getNs()
w = getList()
s = sum(w)
if(s == 0):
	ans = [0]*n
	print(*ans)
	exit(0)

ans = [0]*n
for i in range(n):
	ans[i] = w[i] * m // s
print(*ans)
0