結果

問題 No.1177 余りは?
ユーザー chineristACchineristAC
提出日時 2020-08-21 22:13:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 1,000 ms
コード長 151 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 82,244 KB
実行使用メモリ 53,540 KB
最終ジャッジ日時 2024-04-23 06:38:52
合計ジャッジ時間 2,440 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
52,076 KB
testcase_01 AC 39 ms
52,948 KB
testcase_02 AC 39 ms
52,364 KB
testcase_03 AC 39 ms
52,000 KB
testcase_04 AC 40 ms
51,868 KB
testcase_05 AC 38 ms
52,392 KB
testcase_06 AC 38 ms
52,616 KB
testcase_07 AC 39 ms
52,832 KB
testcase_08 AC 38 ms
53,304 KB
testcase_09 AC 40 ms
53,116 KB
testcase_10 AC 39 ms
52,264 KB
testcase_11 AC 40 ms
52,076 KB
testcase_12 AC 39 ms
52,340 KB
testcase_13 AC 42 ms
53,020 KB
testcase_14 AC 39 ms
51,956 KB
testcase_15 AC 40 ms
52,892 KB
testcase_16 AC 40 ms
52,276 KB
testcase_17 AC 40 ms
53,092 KB
testcase_18 AC 42 ms
53,128 KB
testcase_19 AC 40 ms
52,952 KB
testcase_20 AC 40 ms
53,540 KB
testcase_21 AC 38 ms
52,408 KB
testcase_22 AC 39 ms
52,520 KB
testcase_23 AC 39 ms
52,296 KB
testcase_24 AC 39 ms
52,332 KB
testcase_25 AC 40 ms
52,112 KB
testcase_26 AC 38 ms
52,572 KB
testcase_27 AC 39 ms
52,132 KB
testcase_28 AC 38 ms
52,984 KB
testcase_29 AC 40 ms
53,308 KB
testcase_30 AC 42 ms
52,032 KB
testcase_31 AC 39 ms
53,500 KB
testcase_32 AC 40 ms
52,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p,k=map(int,input().split())
mod=10**9+7
ans=pow(10,p-1,mod)-1
ans%=mod
inv=pow(p,mod-2,mod)
ans=(ans*inv)%mod
if k==0:
    ans=(ans+1)%mod
print(ans)
0