結果

問題 No.118 門松列(2)
ユーザー 双六双六
提出日時 2020-07-22 14:43:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 488 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 89,784 KB
最終ジャッジ日時 2023-09-02 13:08:27
合計ジャッジ時間 5,312 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
77,360 KB
testcase_01 AC 117 ms
89,784 KB
testcase_02 AC 120 ms
89,560 KB
testcase_03 AC 119 ms
89,664 KB
testcase_04 AC 120 ms
89,752 KB
testcase_05 AC 122 ms
89,636 KB
testcase_06 AC 100 ms
76,944 KB
testcase_07 AC 101 ms
77,120 KB
testcase_08 AC 100 ms
77,076 KB
testcase_09 AC 116 ms
88,032 KB
testcase_10 AC 105 ms
78,220 KB
testcase_11 AC 105 ms
79,208 KB
testcase_12 AC 103 ms
77,616 KB
testcase_13 AC 103 ms
77,336 KB
testcase_14 AC 115 ms
88,004 KB
testcase_15 AC 103 ms
77,320 KB
testcase_16 AC 108 ms
82,584 KB
testcase_17 AC 104 ms
77,372 KB
testcase_18 AC 107 ms
79,216 KB
testcase_19 AC 109 ms
81,660 KB
testcase_20 AC 110 ms
82,232 KB
testcase_21 AC 117 ms
86,556 KB
testcase_22 AC 109 ms
78,420 KB
testcase_23 AC 112 ms
85,448 KB
testcase_24 AC 109 ms
79,716 KB
testcase_25 AC 110 ms
81,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	A = getlist()
	L = [0] * 101
	for i in A:
		L[i] += 1

	ans = 0
	for i in range(101):
		for j in range(i + 1, 101):
			for k in range(j + 1, 101):
				ans += L[i] * L[j] * L[k]

	print(ans % con)



if __name__ == '__main__':
	main()
0