結果
| 問題 |
No.723 2つの数の和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-16 19:15:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 252 bytes |
| コンパイル時間 | 203 ms |
| コンパイル使用メモリ | 81,908 KB |
| 実行使用メモリ | 92,460 KB |
| 最終ジャッジ日時 | 2024-06-24 11:15:09 |
| 合計ジャッジ時間 | 3,998 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 21 |
ソースコード
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)