結果

問題 No.1580 I like Logarithm!
ユーザー googol_S0googol_S0
提出日時 2021-07-02 21:25:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 76,392 KB
最終ジャッジ日時 2023-09-11 15:08:15
合計ジャッジ時間 6,402 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
70,888 KB
testcase_01 AC 73 ms
71,128 KB
testcase_02 AC 73 ms
71,020 KB
testcase_03 AC 72 ms
71,016 KB
testcase_04 AC 73 ms
71,044 KB
testcase_05 AC 72 ms
71,028 KB
testcase_06 AC 79 ms
75,980 KB
testcase_07 AC 79 ms
75,980 KB
testcase_08 AC 72 ms
71,332 KB
testcase_09 AC 76 ms
76,032 KB
testcase_10 AC 77 ms
76,392 KB
testcase_11 AC 80 ms
75,756 KB
testcase_12 AC 81 ms
76,044 KB
testcase_13 AC 84 ms
76,008 KB
testcase_14 AC 82 ms
75,992 KB
testcase_15 AC 79 ms
75,988 KB
testcase_16 AC 72 ms
71,220 KB
testcase_17 AC 72 ms
71,244 KB
testcase_18 AC 74 ms
71,200 KB
testcase_19 AC 77 ms
71,184 KB
testcase_20 AC 76 ms
71,084 KB
testcase_21 AC 74 ms
71,344 KB
testcase_22 AC 71 ms
71,024 KB
testcase_23 AC 73 ms
71,324 KB
testcase_24 AC 73 ms
71,188 KB
testcase_25 AC 73 ms
71,240 KB
testcase_26 AC 80 ms
76,004 KB
testcase_27 AC 79 ms
76,024 KB
testcase_28 AC 81 ms
75,964 KB
testcase_29 AC 80 ms
76,348 KB
testcase_30 AC 80 ms
75,780 KB
testcase_31 AC 81 ms
76,012 KB
testcase_32 AC 81 ms
76,008 KB
testcase_33 AC 82 ms
76,152 KB
testcase_34 AC 81 ms
76,100 KB
testcase_35 AC 79 ms
75,976 KB
testcase_36 AC 81 ms
76,208 KB
testcase_37 AC 80 ms
76,124 KB
testcase_38 AC 80 ms
76,012 KB
testcase_39 AC 81 ms
76,024 KB
testcase_40 AC 79 ms
76,272 KB
testcase_41 AC 80 ms
76,004 KB
testcase_42 AC 79 ms
75,996 KB
testcase_43 AC 79 ms
76,052 KB
testcase_44 AC 81 ms
76,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A=int(input())
B=input()
mod=10**9+7
N=len(B)
ANS=0
X=A-1
for i in range(N-1):
  ANS+=X*i
  X=X*A%mod
ANS%=mod
C=int(B[0])-1
for i in range(1,N):
  C=(C*A+int(B[i]))%mod
C+=1
print((ANS+C*(N-1))%mod)
0