結果
| 問題 | No.723 2つの数の和 |
| コンテスト | |
| ユーザー |
nonokai10
|
| 提出日時 | 2018-09-30 14:52:50 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 358 bytes |
| 記録 | |
| コンパイル時間 | 57 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 25,664 KB |
| 最終ジャッジ日時 | 2026-09-14 15:28:59 |
| 合計ジャッジ時間 | 15,776 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 TLE * 3 -- * 1 |
ソースコード
n, x = map(int, input().split())
a = list(map(int, input().split()))
count = {}
for i in a:
if i in count:
count[i] += 1
else:
count[i] = 1
l = []
for key in count:
if x-key in count and not key in l and not x-key in l:
l.append(key)
ans = 0
for i in l:
ans += count[i]*count[x-i]*(2 if i != x-i else 1)
print(ans)
nonokai10