結果
問題 | No.1580 I like Logarithm! |
ユーザー |
![]() |
提出日時 | 2021-09-06 21:53:24 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 220 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 82,164 KB |
実行使用メモリ | 67,568 KB |
最終ジャッジ日時 | 2024-12-22 20:19:53 |
合計ジャッジ時間 | 4,520 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 6 |
other | AC * 11 RE * 28 |
ソースコード
A = int(input()) B = int(input()) B= int(str(B),A) i = 0 x = 1 j = A ans = 0 mod = 10 ** 9 + 7 while x * A <= B: ans = (ans + (A-1) * x * i) % mod i += 1 x *= A ans = (ans + (B - x + 1) * i) % mod print(ans)