結果

問題 No.1407 Kindness
ユーザー GER_chenGER_chen
提出日時 2021-02-26 21:52:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 77,680 KB
最終ジャッジ日時 2024-04-10 12:32:35
合計ジャッジ時間 3,604 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,284 KB
testcase_01 AC 34 ms
52,812 KB
testcase_02 AC 33 ms
52,088 KB
testcase_03 AC 33 ms
52,276 KB
testcase_04 AC 35 ms
53,164 KB
testcase_05 AC 36 ms
53,656 KB
testcase_06 AC 35 ms
52,800 KB
testcase_07 AC 36 ms
52,876 KB
testcase_08 AC 34 ms
52,620 KB
testcase_09 AC 32 ms
52,168 KB
testcase_10 AC 34 ms
52,280 KB
testcase_11 AC 34 ms
52,692 KB
testcase_12 AC 80 ms
69,868 KB
testcase_13 AC 48 ms
63,932 KB
testcase_14 AC 51 ms
64,312 KB
testcase_15 AC 74 ms
68,552 KB
testcase_16 AC 63 ms
66,304 KB
testcase_17 AC 56 ms
64,840 KB
testcase_18 AC 55 ms
64,208 KB
testcase_19 AC 74 ms
69,800 KB
testcase_20 AC 68 ms
67,892 KB
testcase_21 AC 45 ms
61,320 KB
testcase_22 AC 45 ms
61,284 KB
testcase_23 AC 67 ms
66,440 KB
testcase_24 AC 87 ms
71,288 KB
testcase_25 AC 55 ms
64,684 KB
testcase_26 AC 59 ms
66,760 KB
testcase_27 AC 44 ms
61,636 KB
testcase_28 AC 77 ms
69,216 KB
testcase_29 AC 42 ms
60,664 KB
testcase_30 AC 84 ms
70,264 KB
testcase_31 AC 51 ms
63,768 KB
testcase_32 AC 85 ms
77,680 KB
testcase_33 AC 58 ms
67,200 KB
testcase_34 AC 74 ms
73,524 KB
testcase_35 AC 56 ms
66,800 KB
testcase_36 AC 46 ms
61,404 KB
testcase_37 AC 88 ms
72,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = list(map(int, input()))
l = len(N)
mod = 10**9+7
ans = (pow(45, l, mod)-1)*204545456%mod-1
multi = 1
for i in range(l):
    #print(ans)
    if i+1 < l:
        ans += multi*(N[i]-1)*N[i]//2*pow(45, l-1-i, mod)
    ans %= mod
    if i+1 < l:
        multi *= N[i]
    else:
        multi *= N[i]*(N[i]+1)//2
    multi %= mod
ans += multi
ans %= mod
print(ans)
0