結果
| 問題 | No.723 2つの数の和 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-16 19:15:53 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 252 bytes |
| 記録 | |
| コンパイル時間 | 297 ms |
| コンパイル使用メモリ | 85,176 KB |
| 実行使用メモリ | 183,976 KB |
| 最終ジャッジ日時 | 2026-03-10 14:00:52 |
| 合計ジャッジ時間 | 40,190 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 TLE * 11 |
ソースコード
N, X = map(int, input().split())
A = list(map(int, input().split()))
cnts = [0] * (max(A) + 1)
for i in range(N):
cnts[A[i]] += 1
ans = 0
for i in range(max(A) + 1):
d = X - i
if 0 <= d <= max(A):
ans += cnts[i] * cnts[d]
print(ans)