結果

問題 No.723 2つの数の和
ユーザー kept1994kept1994
提出日時 2021-09-02 23:26:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 312 bytes
コンパイル時間 2,085 ms
コンパイル使用メモリ 86,688 KB
実行使用メモリ 92,344 KB
最終ジャッジ日時 2023-08-20 12:50:19
合計ジャッジ時間 5,221 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
72,012 KB
testcase_01 AC 72 ms
72,204 KB
testcase_02 AC 73 ms
72,168 KB
testcase_03 WA -
testcase_04 RE -
testcase_05 RE -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 RE -
testcase_11 WA -
testcase_12 WA -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 91 ms
89,392 KB
testcase_19 AC 94 ms
90,928 KB
testcase_20 AC 74 ms
72,056 KB
testcase_21 AC 74 ms
71,952 KB
testcase_22 AC 71 ms
71,968 KB
testcase_23 AC 95 ms
90,496 KB
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys

def main():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))
    num = [0] * (10 ** 5 + 1)
    ans = 0
    for aa in A:
        num[aa] += 1
    for aa in A:
        ans += num[X - aa]
    print(ans)
    return

if __name__ == '__main__':
    main()
0