結果

問題 No.1580 I like Logarithm!
ユーザー nok0nok0
提出日時 2021-07-02 21:44:43
言語 PyPy3
(7.3.15)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 234 bytes
コンパイル時間 709 ms
コンパイル使用メモリ 87,368 KB
実行使用メモリ 79,336 KB
最終ジャッジ日時 2023-09-11 21:34:53
合計ジャッジ時間 8,136 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,456 KB
testcase_01 AC 73 ms
71,468 KB
testcase_02 AC 75 ms
71,636 KB
testcase_03 AC 74 ms
71,272 KB
testcase_04 AC 73 ms
71,464 KB
testcase_05 AC 73 ms
71,368 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 73 ms
71,404 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 74 ms
71,404 KB
testcase_17 AC 73 ms
71,304 KB
testcase_18 AC 74 ms
71,304 KB
testcase_19 AC 74 ms
71,248 KB
testcase_20 AC 72 ms
71,512 KB
testcase_21 AC 72 ms
71,364 KB
testcase_22 AC 72 ms
71,516 KB
testcase_23 AC 73 ms
71,408 KB
testcase_24 AC 73 ms
71,464 KB
testcase_25 AC 74 ms
71,516 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
testcase_40 RE -
testcase_41 RE -
testcase_42 RE -
testcase_43 RE -
testcase_44 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = int(1e9 + 7)
a = int(input())
b = int(input())
x = 0
for v in str(b):
    x *= a
    x += int(v)
    x %= mod
i = a
res = 0
for _ in range(len(str(b)) - 1):
    res += x - i + 1
    res %= mod
    i *= a
    i %= mod
print(res)
0