結果
| 問題 | No.723 2つの数の和 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-04 11:45:33 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 144 ms / 2,000 ms |
| コード長 | 258 bytes |
| 記録 | |
| コンパイル時間 | 324 ms |
| コンパイル使用メモリ | 20,952 KB |
| 実行使用メモリ | 32,032 KB |
| 最終ジャッジ日時 | 2026-04-09 11:16:14 |
| 合計ジャッジ時間 | 4,796 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
from collections import Counter
n, x = map(int, input().split())
counter = Counter(list(map(int, input().split())))
ans = 0
vals = set(counter.keys())
for val, cnt in counter.items():
if x - val in vals:
ans += cnt * counter[x -val]
print(ans)