結果
| 問題 |
No.723 2つの数の和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-25 13:11:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 250 bytes |
| コンパイル時間 | 170 ms |
| コンパイル使用メモリ | 82,172 KB |
| 実行使用メモリ | 100,808 KB |
| 最終ジャッジ日時 | 2024-11-14 08:59:23 |
| 合計ジャッジ時間 | 3,475 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 RE * 1 |
| other | AC * 5 RE * 17 |
ソースコード
from collections import defaultdict
n, x = map(int, input().split())
a = list(map(int, input().split()))
cnt = defaultdict(int)
for k in a:
cnt[k] += 1
ans = 0
for k, v in cnt.items():
if k > x:
continue
ans += v * cnt[x - k]
print(ans)