結果

問題 No.1629 Sorting Integers (SUM of M)
ユーザー amino
提出日時 2021-07-30 22:52:20
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 331 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-16 02:30:49
合計ジャッジ時間 1,706 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other RE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
c = list(map(int,input().split()))
a = 0
mod = 10 ** 9 + 7
def fa(n,mod):
    a = 1
    for i in range(n):
        a *= i + 1
        a %= mod
    return a
for i in range(9):
    a += (i + 1) * c[i]
s = fa(n,mod)
for i in range(9):
    s //= fa(c[i],mod)
    s %= mod
t = int("1" * n)
print((s * a // n * t) % mod)
0