結果

問題 No.2517 Right Triangles on Circle
ユーザー べんけのーび
提出日時 2023-10-30 16:46:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 205 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 82,660 KB
実行使用メモリ 169,492 KB
最終ジャッジ日時 2024-09-25 17:19:06
合計ジャッジ時間 4,526 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 6 WA * 22 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = list(map(int, input().split()))
Aset = set(A)
if M%2:
	print(0)
	exit()
ans = 0
i = 0
while A[i] < M//2:
	if (A[i] + M//2) % M in Aset:
		ans += N-2
	i += 1

print(ans)
0