結果

問題 No.2517 Right Triangles on Circle
ユーザー pitPpitP
提出日時 2023-10-27 21:31:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 169 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 81,760 KB
実行使用メモリ 168,272 KB
最終ジャッジ日時 2023-10-27 21:31:15
合計ジャッジ時間 4,059 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,520 KB
testcase_01 AC 34 ms
53,520 KB
testcase_02 AC 40 ms
53,520 KB
testcase_03 AC 33 ms
53,520 KB
testcase_04 AC 33 ms
53,520 KB
testcase_05 AC 32 ms
53,520 KB
testcase_06 AC 36 ms
53,520 KB
testcase_07 AC 33 ms
53,520 KB
testcase_08 AC 34 ms
53,520 KB
testcase_09 AC 35 ms
53,520 KB
testcase_10 AC 35 ms
53,520 KB
testcase_11 AC 34 ms
53,520 KB
testcase_12 AC 35 ms
53,520 KB
testcase_13 AC 154 ms
158,428 KB
testcase_14 AC 101 ms
109,768 KB
testcase_15 AC 169 ms
168,272 KB
testcase_16 AC 165 ms
167,904 KB
testcase_17 AC 145 ms
116,756 KB
testcase_18 AC 121 ms
112,644 KB
testcase_19 AC 113 ms
136,192 KB
testcase_20 AC 120 ms
137,968 KB
testcase_21 AC 164 ms
162,332 KB
testcase_22 AC 50 ms
78,408 KB
testcase_23 AC 144 ms
135,428 KB
testcase_24 AC 75 ms
99,744 KB
testcase_25 AC 50 ms
75,372 KB
testcase_26 AC 146 ms
146,580 KB
testcase_27 AC 54 ms
76,856 KB
testcase_28 AC 53 ms
76,596 KB
testcase_29 AC 71 ms
99,348 KB
testcase_30 AC 59 ms
85,360 KB
testcase_31 AC 132 ms
135,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = list(map(int, input().split()))
if M % 2 :
    exit(print(0))
st = set()
for i in range(N):
    st.add(A[i])

ans = 0
for i in range(N):
    if A[i] + M // 2 in st:
        ans += N - 2
print(ans)
0