結果
問題 |
No.182 新規性の虜
|
ユーザー |
|
提出日時 | 2025-01-02 00:10:42 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 425 bytes |
コンパイル時間 | 499 ms |
コンパイル使用メモリ | 12,160 KB |
実行使用メモリ | 20,236 KB |
最終ジャッジ日時 | 2025-01-02 00:10:46 |
合計ジャッジ時間 | 3,026 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 9 WA * 16 RE * 2 |
ソースコード
def main(): n = int(input()) a = [int(i) for i in input().split(" ")] sorted_a = sorted(a) count = 0 if n >= 3: for i in range(1, n - 1): if sorted_a[i] != sorted_a[i + 1] and sorted_a[i] != sorted_a[i - 1]: count += 1 if sorted_a[0] != sorted_a[1] or sorted_a[n - 2] != sorted_a[n - 1]: count += 1 print(count) if __name__ == "__main__": main()