結果

問題 No.1177 余りは?
ユーザー mlihua09mlihua09
提出日時 2020-08-21 22:10:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 1,000 ms
コード長 187 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 82,108 KB
実行使用メモリ 53,852 KB
最終ジャッジ日時 2024-04-23 06:37:58
合計ジャッジ時間 2,391 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
53,420 KB
testcase_01 AC 40 ms
52,792 KB
testcase_02 AC 39 ms
52,004 KB
testcase_03 AC 37 ms
53,852 KB
testcase_04 AC 38 ms
51,996 KB
testcase_05 AC 38 ms
52,680 KB
testcase_06 AC 38 ms
52,388 KB
testcase_07 AC 39 ms
53,396 KB
testcase_08 AC 38 ms
53,440 KB
testcase_09 AC 38 ms
53,464 KB
testcase_10 AC 37 ms
53,072 KB
testcase_11 AC 39 ms
53,204 KB
testcase_12 AC 38 ms
52,108 KB
testcase_13 AC 38 ms
52,280 KB
testcase_14 AC 37 ms
53,612 KB
testcase_15 AC 37 ms
52,096 KB
testcase_16 AC 37 ms
53,132 KB
testcase_17 AC 38 ms
53,012 KB
testcase_18 AC 38 ms
52,956 KB
testcase_19 AC 38 ms
53,016 KB
testcase_20 AC 39 ms
52,656 KB
testcase_21 AC 38 ms
52,344 KB
testcase_22 AC 38 ms
52,468 KB
testcase_23 AC 38 ms
52,084 KB
testcase_24 AC 38 ms
53,472 KB
testcase_25 AC 38 ms
52,484 KB
testcase_26 AC 38 ms
53,544 KB
testcase_27 AC 38 ms
53,396 KB
testcase_28 AC 38 ms
52,824 KB
testcase_29 AC 37 ms
53,532 KB
testcase_30 AC 38 ms
52,032 KB
testcase_31 AC 38 ms
52,740 KB
testcase_32 AC 37 ms
52,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p, k = map(int, input().split())

import math

ans = pow(10, p - 1, 10 ** 9 + 7) - 1

ans *= pow(p, 10 ** 9 + 5, 10 ** 9 + 7)

if k == 0:
    ans += 1
    
ans %= 10 ** 9 + 7

print(ans)
0