結果
問題 | No.118 門松列(2) |
ユーザー |
![]() |
提出日時 | 2015-10-13 17:41:35 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 80 ms / 5,000 ms |
コード長 | 178 bytes |
コンパイル時間 | 79 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 12,256 KB |
最終ジャッジ日時 | 2024-10-09 07:11:15 |
合計ジャッジ時間 | 2,241 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
ソースコード
from itertools import combinations as comb N = input() A = map(int,raw_input().split()) V = [0]*(100) for a in A: V[a-1] += 1 print sum(x*y*z for x,y,z in comb(V,3)) % (10**9+7)