結果
問題 | No.1419 Power Moves |
ユーザー | pluto77 |
提出日時 | 2021-03-19 11:40:49 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 315 bytes |
コンパイル時間 | 175 ms |
コンパイル使用メモリ | 82,392 KB |
実行使用メモリ | 257,396 KB |
最終ジャッジ日時 | 2024-04-29 00:40:57 |
合計ジャッジ時間 | 7,518 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 39 ms
59,016 KB |
testcase_01 | AC | 40 ms
52,820 KB |
testcase_02 | AC | 39 ms
53,288 KB |
testcase_03 | AC | 38 ms
52,356 KB |
testcase_04 | AC | 38 ms
53,340 KB |
testcase_05 | AC | 39 ms
53,168 KB |
testcase_06 | AC | 39 ms
52,224 KB |
testcase_07 | AC | 38 ms
53,104 KB |
testcase_08 | AC | 38 ms
52,072 KB |
testcase_09 | TLE | - |
testcase_10 | AC | 52 ms
64,020 KB |
testcase_11 | AC | 115 ms
79,020 KB |
testcase_12 | AC | 644 ms
256,380 KB |
testcase_13 | TLE | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
ソースコード
#yuki1419 MOD=10**9+7 n,k=map(int,input().split()) s=(-(pow(2,k,n)-1))%n x=pow(2,k,MOD*n)%(MOD*n) q=x//n r=x%n d=[q]*n for i in range(r): d[i]+=1 d2=[0]*n for i in range(n): d2[2*i%n]+=d[i] res=[0]*n t=pow(pow(2,k,MOD),MOD-2,MOD) for i in range(n): res[(s+i)%n]+=d2[i]*t res[(s+i)%n]%=MOD print(*res,sep='\n')