結果
| 問題 | No.118 門松列(2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-20 23:47:44 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 237 bytes |
| 記録 | |
| コンパイル時間 | 61 ms |
| コンパイル使用メモリ | 81,044 KB |
| 実行使用メモリ | 91,184 KB |
| 最終ジャッジ日時 | 2026-07-18 01:20:52 |
| 合計ジャッジ時間 | 3,484 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 22 |
ソースコード
n = input() a = map(int, raw_input().split()) a.sort() num = [0] * 101 for x in a: num[x] += 1 s1, s2, s3 = 0, 0, 0 for x in num: s1 += x s2 += x * x s3 += x * x * x ans = (s1 ** 3 - s1 * s2 - 2 * s1 * s2 + 2 * s3) / 6 print ans