結果

問題 No.118 門松列(2)
ユーザー pekempeypekempey
提出日時 2015-12-20 23:36:18
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 105 ms / 5,000 ms
コード長 266 bytes
コンパイル時間 1,188 ms
コンパイル使用メモリ 76,544 KB
実行使用メモリ 85,924 KB
最終ジャッジ日時 2024-04-17 13:17:46
合計ジャッジ時間 4,858 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
77,952 KB
testcase_01 AC 105 ms
85,632 KB
testcase_02 AC 104 ms
85,504 KB
testcase_03 AC 103 ms
85,896 KB
testcase_04 AC 105 ms
85,632 KB
testcase_05 AC 103 ms
85,924 KB
testcase_06 AC 83 ms
77,568 KB
testcase_07 AC 80 ms
77,568 KB
testcase_08 AC 83 ms
77,568 KB
testcase_09 AC 105 ms
84,716 KB
testcase_10 AC 86 ms
79,360 KB
testcase_11 AC 89 ms
80,044 KB
testcase_12 AC 84 ms
77,824 KB
testcase_13 AC 84 ms
77,852 KB
testcase_14 AC 104 ms
84,736 KB
testcase_15 AC 82 ms
78,080 KB
testcase_16 AC 96 ms
81,056 KB
testcase_17 AC 84 ms
78,236 KB
testcase_18 AC 90 ms
79,616 KB
testcase_19 AC 94 ms
80,512 KB
testcase_20 AC 94 ms
81,280 KB
testcase_21 AC 98 ms
83,496 KB
testcase_22 AC 88 ms
79,616 KB
testcase_23 AC 99 ms
82,848 KB
testcase_24 AC 90 ms
80,384 KB
testcase_25 AC 94 ms
81,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()
a = map(int, raw_input().split())
a.sort()

num = [0] * 101
for x in a:
	num[x] += 1

ans = 0

for i in xrange(101):
	for j in xrange(i + 1, 101):
		for k in xrange(j + 1, 101):
			ans += num[i] * num[j] * num[k]

mod = 10 ** 9 + 7
ans %= mod

print ans
0