結果
問題 |
No.3067 +10 Seconds Clock
|
ユーザー |
![]() |
提出日時 | 2025-04-16 00:08:24 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 381 bytes |
コンパイル時間 | 205 ms |
コンパイル使用メモリ | 81,396 KB |
実行使用メモリ | 66,232 KB |
最終ジャッジ日時 | 2025-04-16 00:09:30 |
合計ジャッジ時間 | 2,693 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 23 |
ソースコード
import sys from collections import defaultdict def main(): n = int(sys.stdin.readline()) a = list(map(int, sys.stdin.readline().split())) count_map = defaultdict(int) for num in a: count_map[num] += 1 ans = 0 for num in a: target = num ^ 1 ans += count_map.get(target, 0) print(ans // 2) if __name__ == "__main__": main()