結果
| 問題 | No.1629 Sorting Integers (SUM of M) |
| コンテスト | |
| ユーザー |
SidewaysOwl
|
| 提出日時 | 2021-07-30 20:43:42 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 270 bytes |
| 記録 | |
| コンパイル時間 | 687 ms |
| コンパイル使用メモリ | 20,576 KB |
| 実行使用メモリ | 48,832 KB |
| 最終ジャッジ日時 | 2026-04-05 02:21:56 |
| 合計ジャッジ時間 | 7,040 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | RE * 14 |
ソースコード
from itertools import permutations
n = int(input())
c = list(map(int,input().split()))
ans = ""
for i in range(8,-1,-1):
for j in range(c[i]):
ans += str((i+1))
s = set()
for pt in permutations(ans):
s.add(int("".join(pt)))
print(sum(s) % (10 ** 9 + 7))
SidewaysOwl