結果
問題 |
No.723 2つの数の和
|
ユーザー |
![]() |
提出日時 | 2020-03-01 08:09:51 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 346 bytes |
コンパイル時間 | 152 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 24,112 KB |
最終ジャッジ日時 | 2024-10-13 20:30:40 |
合計ジャッジ時間 | 3,730 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 1 -- * 21 |
ソースコード
N,X = map(int,input().split()) A = list(map(int,input().split())) cnt = 0 A2 = [] for i in range(N): if A[i] <= X: A2.append(A[i]) for i in range(len(A2)): for j in range(i,len(A2)): sum = A[i] + A2[j] if sum == X and i == j: cnt += 1 elif sum == X and i != j: cnt += 2 print(cnt)