結果

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

ソースコード

diff #

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

print(ans)
0