結果
問題 | No.118 門松列(2) |
ユーザー |
![]() |
提出日時 | 2023-09-10 01:42:42 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 71 ms / 5,000 ms |
コード長 | 415 bytes |
コンパイル時間 | 237 ms |
コンパイル使用メモリ | 82,520 KB |
実行使用メモリ | 82,816 KB |
最終ジャッジ日時 | 2024-06-27 17:48:42 |
合計ジャッジ時間 | 2,723 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
ソースコード
import sys, math input = lambda: sys.stdin.readline()[:-1] def MI(): return map(int, input().split()) inf = 10**18 mod = 10**9+7 from collections import * n = int(input()) a = list(MI()) cnt = [0] * 101 for i in a: cnt[i] += 1 ans = 0 for b1 in range(1, 101): for b2 in range(b1+1, 101): for b3 in range(b2+1, 101): ans += cnt[b1] * cnt[b2] * cnt[b3] ans %= mod print(ans)