結果

問題 No.2517 Right Triangles on Circle
コンテスト
ユーザー べんけのーび
提出日時 2023-10-30 16:46:38
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 205 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 134 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 177,408 KB
最終ジャッジ日時 2026-04-12 21:05:09
合計ジャッジ時間 3,501 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 6 WA * 22 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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