結果

問題 No.118 門松列(2)
ユーザー TawaraTawara
提出日時 2015-10-13 17:41:35
言語 Python2
(2.7.18)
結果
AC  
実行時間 80 ms / 5,000 ms
コード長 178 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 12,252 KB
最終ジャッジ日時 2024-04-17 13:10:22
合計ジャッジ時間 2,268 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
6,528 KB
testcase_01 AC 80 ms
12,252 KB
testcase_02 AC 76 ms
12,068 KB
testcase_03 AC 76 ms
12,032 KB
testcase_04 AC 75 ms
12,232 KB
testcase_05 AC 78 ms
12,220 KB
testcase_06 AC 27 ms
6,400 KB
testcase_07 AC 26 ms
6,400 KB
testcase_08 AC 28 ms
6,528 KB
testcase_09 AC 73 ms
11,896 KB
testcase_10 AC 36 ms
7,680 KB
testcase_11 AC 40 ms
8,064 KB
testcase_12 AC 32 ms
7,296 KB
testcase_13 AC 29 ms
6,784 KB
testcase_14 AC 72 ms
11,812 KB
testcase_15 AC 27 ms
6,528 KB
testcase_16 AC 53 ms
9,464 KB
testcase_17 AC 31 ms
6,784 KB
testcase_18 AC 40 ms
8,064 KB
testcase_19 AC 50 ms
9,088 KB
testcase_20 AC 50 ms
9,216 KB
testcase_21 AC 66 ms
10,880 KB
testcase_22 AC 36 ms
7,680 KB
testcase_23 AC 58 ms
10,496 KB
testcase_24 AC 40 ms
8,320 KB
testcase_25 AC 44 ms
8,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0