結果
問題 |
No.723 2つの数の和
|
ユーザー |
![]() |
提出日時 | 2018-10-25 20:49:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 390 bytes |
コンパイル時間 | 661 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 31,484 KB |
最終ジャッジ日時 | 2024-11-19 05:48:46 |
合計ジャッジ時間 | 57,749 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 2 WA * 2 TLE * 18 |
ソースコード
n, x = [int(s) for s in input().split(' ')] nums = sorted([int(s) for s in input().split(' ')]) count = 0 for indexs, i in enumerate(nums): if i <= x: for s in nums[indexs+1:]: if (i + s) == x: count += 2 elif i * 2 == x: count += 1 elif (i + s) > x: break else: break print(count)