結果
| 問題 | No.1629 Sorting Integers (SUM of M) |
| コンテスト | |
| ユーザー |
amino
|
| 提出日時 | 2021-07-30 22:50:40 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 308 bytes |
| 記録 | |
| コンパイル時間 | 434 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 21,756 KB |
| 最終ジャッジ日時 | 2026-04-05 06:19:16 |
| 合計ジャッジ時間 | 8,220 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | RE * 2 TLE * 2 -- * 10 |
ソースコード
n = int(input())
c = list(map(int,input().split()))
a = 0
mod = 10 ** 9 + 7
def fa(n):
a = 1
for i in range(n):
a *= i + 1
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])
s %= mod
t = int("1" * n)
print((s * a // n * t) % mod)
amino