結果
| 問題 |
No.118 門松列(2)
|
| ユーザー |
|
| 提出日時 | 2020-04-28 00:52:48 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 201 ms / 5,000 ms |
| コード長 | 259 bytes |
| コンパイル時間 | 246 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 16,552 KB |
| 最終ジャッジ日時 | 2024-11-22 18:01:15 |
| 合計ジャッジ時間 | 5,657 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 26 |
ソースコード
import itertools
from collections import Counter
N = int(input())
A = Counter(map(int, input().split()))
lA = len(A)
MOD = 10 ** 9 + 7
ans = 0
for t in itertools.combinations(range(1, 101), 3):
ans = (ans + A[t[0]] * A[t[1]] * A[t[2]]) % MOD
print(ans)