結果

問題 No.2647 [Cherry 6th Tune A] Wind
ユーザー 👑 tipstar0125tipstar0125
提出日時 2024-02-23 21:39:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 627 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 72,828 KB
最終ジャッジ日時 2024-02-23 21:39:13
合計ジャッジ時間 1,972 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 59 ms
66,660 KB
testcase_02 AC 54 ms
64,584 KB
testcase_03 AC 62 ms
68,724 KB
testcase_04 AC 53 ms
64,580 KB
testcase_05 AC 60 ms
68,712 KB
testcase_06 AC 60 ms
68,716 KB
testcase_07 AC 63 ms
68,716 KB
testcase_08 AC 62 ms
68,724 KB
testcase_09 AC 63 ms
70,772 KB
testcase_10 AC 63 ms
70,764 KB
testcase_11 AC 66 ms
72,820 KB
testcase_12 AC 67 ms
72,828 KB
testcase_13 AC 37 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
for _ in range(T):
    D,A=list(map(int,input().split()))
    X=list(map(int,input().split()))
    ans=[]
    for x in X:
        q=x//A
        r=x%A
        if A%2==0:
            if r>=A//2:q+=1
        else:
            if r>=A//2+1:q+=1
        ans.append(q)
    print(*ans)
0