結果

問題 No.2647 [Cherry 6th Tune A] Wind
ユーザー player
提出日時 2024-02-25 00:54:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 553 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 84,072 KB
最終ジャッジ日時 2024-09-29 10:30:45
合計ジャッジ時間 4,824 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import Decimal, ROUND_HALF_EVEN


def precise_round_to_int(number):
    # Decimalオブジェクトに変換
    decimal_number = Decimal(str(number))

    # 正確な四捨五入
    rounded_number = decimal_number.quantize(
        Decimal('1'), rounding=ROUND_HALF_EVEN)

    return (rounded_number)


t = int(input())

for _ in range(t):
    d, a = map(int, input().split())
    x = list(map(int, input().split()))
    ans = []
    for i in range(d):
        num = precise_round_to_int(x[i] / a)
        ans.append(num)
    print(*ans)
0