結果

問題 No.1419 Power Moves
ユーザー convexineqconvexineq
提出日時 2021-03-05 21:51:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 258 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 82,160 KB
実行使用メモリ 79,232 KB
最終ジャッジ日時 2024-04-16 09:18:13
合計ジャッジ時間 3,953 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
51,840 KB
testcase_01 AC 44 ms
51,840 KB
testcase_02 AC 42 ms
51,456 KB
testcase_03 AC 42 ms
51,712 KB
testcase_04 AC 42 ms
51,584 KB
testcase_05 AC 42 ms
51,456 KB
testcase_06 AC 42 ms
51,840 KB
testcase_07 AC 42 ms
51,584 KB
testcase_08 AC 42 ms
51,840 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 79 ms
78,464 KB
testcase_15 AC 80 ms
78,208 KB
testcase_16 AC 78 ms
78,208 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10**9+7
n,k = map(int,input().split())
d = pow(2,k,n*MOD)//n
r = pow(2,k,n)
res = [d+1]*(r) + [d]*(n-r)
ans = [0]*n
inv = pow(2,MOD-1-k,MOD)
d = pow(2,k,MOD)
for i in range(n):
    ans[(2*i-d+1)%n] += res[i]
for i in range(n):
    print(ans[i]*inv%MOD)
0