結果

問題 No.1049 Zero (Exhaust)
ユーザー 👑 H20H20
提出日時 2021-04-22 15:54:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 545 ms / 2,000 ms
コード長 116 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 76,132 KB
最終ジャッジ日時 2023-09-17 10:05:29
合計ジャッジ時間 9,373 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,544 KB
testcase_01 AC 74 ms
71,160 KB
testcase_02 AC 75 ms
71,484 KB
testcase_03 AC 391 ms
75,936 KB
testcase_04 AC 74 ms
71,312 KB
testcase_05 AC 326 ms
76,116 KB
testcase_06 AC 542 ms
76,012 KB
testcase_07 AC 127 ms
75,976 KB
testcase_08 AC 203 ms
76,008 KB
testcase_09 AC 417 ms
76,016 KB
testcase_10 AC 451 ms
76,056 KB
testcase_11 AC 452 ms
75,860 KB
testcase_12 AC 518 ms
75,916 KB
testcase_13 AC 166 ms
75,976 KB
testcase_14 AC 266 ms
75,976 KB
testcase_15 AC 393 ms
75,996 KB
testcase_16 AC 329 ms
75,972 KB
testcase_17 AC 343 ms
76,012 KB
testcase_18 AC 459 ms
75,860 KB
testcase_19 AC 398 ms
76,016 KB
testcase_20 AC 202 ms
76,040 KB
testcase_21 AC 407 ms
76,132 KB
testcase_22 AC 257 ms
75,960 KB
testcase_23 AC 545 ms
75,924 KB
testcase_24 AC 544 ms
75,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P,K=map(int,input().split())
p = 1
MOD= 10**9+7
for i in range(K):
    p=(p*(P+1)+(pow(2*P,i,MOD)-p)*2)%MOD
print(p)
0