結果
問題 | No.1738 What's in the box? |
ユーザー |
![]() |
提出日時 | 2021-11-14 21:45:18 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 54 ms / 2,000 ms |
コード長 | 623 bytes |
コンパイル時間 | 153 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 61,184 KB |
最終ジャッジ日時 | 2024-11-30 06:59:36 |
合計ジャッジ時間 | 5,172 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 70 |
ソースコード
#!usr/bin/env python3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations, accumulate import sys import math import bisect def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def IR(n): return [I() for _ in range(n)] def LIR(n): return [LI() for _ in range(n)] sys.setrecursionlimit(1000000) mod = 1000000007 def main(): n,m = LI() w = LI() s = sum(w) if s == 0: print(*w) return print(*[(m*i)//s for i in w]) return if __name__ == "__main__": main()