結果

問題 No.2517 Right Triangles on Circle
ユーザー ntuda
提出日時 2025-10-11 13:33:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 199 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 82,428 KB
実行使用メモリ 168,332 KB
最終ジャッジ日時 2025-10-11 13:33:18
合計ジャッジ時間 4,954 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
if M % 2 == 1:
    print(0)
    exit()
M2 = M // 2
N2 = N - 2
A = list(map(int,input().split()))
S = set(A)
ans = 0
cnt = 0
for a in A:
    if a + M2 in S:
        cnt += 1
print(cnt * N2)
0