結果
| 問題 | No.1629 Sorting Integers (SUM of M) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-30 20:54:20 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 407 bytes |
| 記録 | |
| コンパイル時間 | 639 ms |
| コンパイル使用メモリ | 20,832 KB |
| 実行使用メモリ | 1,315,496 KB |
| 最終ジャッジ日時 | 2026-04-05 02:29:41 |
| 合計ジャッジ時間 | 6,798 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | MLE * 2 -- * 12 |
ソースコード
import typing
from itertools import (
permutations,
)
import numpy as np
def main() -> typing.NoReturn:
mod = 10 ** 9 + 7
n = int(input())
*c, = map(
int, input().split(),
)
a = []
for i in range(9):
a += [i + 1] * c[i]
p = np.array((
*permutations(a),
))
p = np.unique(p, axis=0)
d = 10 ** np.arange(n)
s = p.sum(axis=0) % mod * d
print(s.sum() % mod)
main()