結果

問題 No.1407 Kindness
ユーザー GER_chenGER_chen
提出日時 2021-02-26 21:52:36
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 86,856 KB
実行使用メモリ 82,608 KB
最終ジャッジ日時 2023-07-25 21:01:03
合計ジャッジ時間 5,958 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
70,980 KB
testcase_01 AC 78 ms
71,080 KB
testcase_02 AC 77 ms
71,296 KB
testcase_03 AC 78 ms
71,344 KB
testcase_04 AC 78 ms
71,096 KB
testcase_05 AC 78 ms
71,244 KB
testcase_06 AC 78 ms
71,212 KB
testcase_07 AC 81 ms
71,032 KB
testcase_08 AC 79 ms
71,324 KB
testcase_09 AC 77 ms
70,972 KB
testcase_10 AC 78 ms
71,100 KB
testcase_11 AC 79 ms
71,076 KB
testcase_12 AC 128 ms
81,692 KB
testcase_13 AC 94 ms
76,604 KB
testcase_14 AC 95 ms
77,168 KB
testcase_15 AC 123 ms
81,056 KB
testcase_16 AC 108 ms
78,840 KB
testcase_17 AC 98 ms
77,892 KB
testcase_18 AC 99 ms
77,876 KB
testcase_19 AC 119 ms
80,756 KB
testcase_20 AC 112 ms
79,808 KB
testcase_21 AC 89 ms
76,272 KB
testcase_22 AC 88 ms
76,280 KB
testcase_23 AC 112 ms
79,704 KB
testcase_24 AC 130 ms
82,408 KB
testcase_25 AC 99 ms
77,652 KB
testcase_26 AC 104 ms
78,600 KB
testcase_27 AC 87 ms
76,284 KB
testcase_28 AC 122 ms
80,792 KB
testcase_29 AC 86 ms
76,556 KB
testcase_30 AC 129 ms
81,648 KB
testcase_31 AC 93 ms
76,816 KB
testcase_32 AC 126 ms
81,244 KB
testcase_33 AC 101 ms
77,280 KB
testcase_34 AC 114 ms
79,372 KB
testcase_35 AC 98 ms
76,860 KB
testcase_36 AC 88 ms
76,304 KB
testcase_37 AC 131 ms
82,608 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