結果

問題 No.2517 Right Triangles on Circle
ユーザー べんけのーびべんけのーび
提出日時 2023-10-30 16:47:16
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 214 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 81,844 KB
実行使用メモリ 171,384 KB
最終ジャッジ日時 2023-10-30 16:47:22
合計ジャッジ時間 5,479 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,596 KB
testcase_01 AC 35 ms
53,596 KB
testcase_02 WA -
testcase_03 AC 35 ms
53,596 KB
testcase_04 AC 36 ms
53,596 KB
testcase_05 AC 35 ms
53,596 KB
testcase_06 AC 36 ms
53,596 KB
testcase_07 AC 36 ms
53,596 KB
testcase_08 AC 35 ms
53,596 KB
testcase_09 AC 36 ms
53,596 KB
testcase_10 AC 36 ms
53,596 KB
testcase_11 AC 37 ms
53,596 KB
testcase_12 AC 36 ms
53,596 KB
testcase_13 WA -
testcase_14 AC 197 ms
160,868 KB
testcase_15 AC 222 ms
171,104 KB
testcase_16 RE -
testcase_17 AC 177 ms
118,428 KB
testcase_18 AC 170 ms
113,032 KB
testcase_19 AC 155 ms
139,012 KB
testcase_20 AC 157 ms
139,480 KB
testcase_21 AC 217 ms
165,360 KB
testcase_22 AC 81 ms
93,680 KB
testcase_23 AC 173 ms
136,936 KB
testcase_24 AC 96 ms
100,404 KB
testcase_25 AC 73 ms
88,100 KB
testcase_26 AC 200 ms
148,604 KB
testcase_27 AC 80 ms
90,892 KB
testcase_28 AC 63 ms
76,832 KB
testcase_29 AC 95 ms
100,128 KB
testcase_30 AC 74 ms
85,656 KB
testcase_31 AC 177 ms
137,460 KB
権限があれば一括ダウンロードができます

ソースコード

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 A[i] < M//2:
	if (A[i] + M//2) % M in Aset:
		ans += N-2
	i += 1

print(ans)
0