結果
問題 |
No.1470 Mex Sum
|
ユーザー |
|
提出日時 | 2021-04-09 21:24:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 218 bytes |
コンパイル時間 | 217 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 19,000 KB |
最終ジャッジ日時 | 2024-06-25 03:59:15 |
合計ジャッジ時間 | 5,398 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 WA * 35 |
ソースコード
n = int(input()) a = list(map(int, input().split())) one, two = a.count(1), a.count(2) oth = n - (one + two) print((one * two) * 3 + (one * (one - 1) // 2) * 2 + (n * (n - 1) // 2 - (one * two + one * (one - 1) // 2)))