結果

問題 No.118 門松列(2)
ユーザー yaoshimaxyaoshimax
提出日時 2015-03-28 21:18:48
言語 Python2
(2.7.18)
結果
AC  
実行時間 112 ms / 5,000 ms
コード長 272 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 7,072 KB
実行使用メモリ 12,100 KB
最終ジャッジ日時 2024-04-17 12:55:40
合計ジャッジ時間 3,303 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
6,812 KB
testcase_01 AC 112 ms
12,004 KB
testcase_02 AC 108 ms
11,820 KB
testcase_03 AC 109 ms
11,912 KB
testcase_04 AC 110 ms
11,984 KB
testcase_05 AC 112 ms
12,100 KB
testcase_06 AC 59 ms
6,940 KB
testcase_07 AC 58 ms
6,940 KB
testcase_08 AC 58 ms
6,944 KB
testcase_09 AC 108 ms
11,776 KB
testcase_10 AC 70 ms
7,424 KB
testcase_11 AC 73 ms
7,936 KB
testcase_12 AC 66 ms
7,168 KB
testcase_13 AC 63 ms
6,944 KB
testcase_14 AC 109 ms
11,688 KB
testcase_15 AC 60 ms
6,944 KB
testcase_16 AC 85 ms
9,468 KB
testcase_17 AC 64 ms
6,940 KB
testcase_18 AC 73 ms
7,936 KB
testcase_19 AC 83 ms
8,832 KB
testcase_20 AC 84 ms
9,088 KB
testcase_21 AC 98 ms
10,668 KB
testcase_22 AC 70 ms
7,552 KB
testcase_23 AC 98 ms
10,496 KB
testcase_24 AC 75 ms
8,192 KB
testcase_25 AC 81 ms
8,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(raw_input())
a=map(int,raw_input().split())
cnt=[0 for i in range(101)]
for i in a:
    cnt[i]+=1
ans=0
for i in range(1,101):
    for j in range(i+1, 101):
        for k in range(j+1,101):
            ans+=cnt[i]*cnt[j]*cnt[k]
            ans%=1000000007
print ans
0