結果
問題 |
No.118 門松列(2)
|
ユーザー |
|
提出日時 | 2016-03-04 18:51:45 |
言語 | PyPy2 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 387 bytes |
コンパイル時間 | 536 ms |
コンパイル使用メモリ | 77,200 KB |
実行使用メモリ | 85,544 KB |
最終ジャッジ日時 | 2024-09-24 14:10:31 |
合計ジャッジ時間 | 3,964 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 22 |
ソースコード
# coding: utf-8 #yuki_118 def fact(n): if n == 0: return 1 elif n>0: return n*fact(n-1) def r_outof_n(r,n): return fact(n)/(fact(r)*fact(n-r)) n=int(raw_input()) list=map(int,raw_input().split()) t=[(x, list.count(x)) for x in set(list)] lt=len(t) mul=1 for i in xrange(len(t)): mul=(mul*t[i][1])%(10**9+7) rofn=r_outof_n(3,lt) rofn=rofn%(10**9+7) print (mul*rofn)%(10**9+7)