結果

問題 No.1419 Power Moves
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-06-19 16:30:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 79,148 KB
最終ジャッジ日時 2023-09-05 00:59:10
合計ジャッジ時間 6,907 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,716 KB
testcase_01 AC 73 ms
71,680 KB
testcase_02 AC 67 ms
71,720 KB
testcase_03 AC 69 ms
71,628 KB
testcase_04 AC 70 ms
71,380 KB
testcase_05 AC 68 ms
71,508 KB
testcase_06 AC 68 ms
71,416 KB
testcase_07 AC 67 ms
71,508 KB
testcase_08 AC 72 ms
71,364 KB
testcase_09 AC 90 ms
78,344 KB
testcase_10 AC 79 ms
76,796 KB
testcase_11 AC 86 ms
76,904 KB
testcase_12 AC 94 ms
78,756 KB
testcase_13 AC 92 ms
78,524 KB
testcase_14 AC 89 ms
78,944 KB
testcase_15 AC 90 ms
79,088 KB
testcase_16 AC 90 ms
78,944 KB
testcase_17 AC 67 ms
71,368 KB
testcase_18 AC 68 ms
71,308 KB
testcase_19 AC 68 ms
71,648 KB
testcase_20 AC 92 ms
78,960 KB
testcase_21 AC 91 ms
79,044 KB
testcase_22 AC 89 ms
78,924 KB
testcase_23 AC 90 ms
78,864 KB
testcase_24 AC 92 ms
78,996 KB
testcase_25 AC 92 ms
78,680 KB
testcase_26 AC 93 ms
79,148 KB
testcase_27 AC 92 ms
78,588 KB
testcase_28 AC 96 ms
78,840 KB
testcase_29 AC 95 ms
78,576 KB
testcase_30 AC 92 ms
78,900 KB
testcase_31 AC 91 ms
78,988 KB
testcase_32 AC 91 ms
79,064 KB
testcase_33 AC 90 ms
79,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
mod = 10**9+7

x = pow(2,k,n*mod)
d,m = divmod(x,n)
count = [d]*n
for i in range(m):
    count[i] += 1

ans = [0]*n
p = pow(2,k,n)-1
for i in range(n):
    ans[(2*i-p)%n] += count[i]

inv = pow(2,mod-1-k,mod)
for i in ans:
    print(i*inv%mod)
0