結果

問題 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
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,456 KB
testcase_01 AC 40 ms
51,712 KB
testcase_02 WA -
testcase_03 AC 36 ms
51,584 KB
testcase_04 AC 36 ms
51,968 KB
testcase_05 AC 36 ms
51,584 KB
testcase_06 AC 39 ms
51,968 KB
testcase_07 AC 38 ms
51,584 KB
testcase_08 AC 37 ms
51,712 KB
testcase_09 AC 38 ms
51,712 KB
testcase_10 AC 38 ms
51,968 KB
testcase_11 AC 36 ms
51,840 KB
testcase_12 AC 35 ms
52,096 KB
testcase_13 WA -
testcase_14 AC 201 ms
160,468 KB
testcase_15 AC 226 ms
170,820 KB
testcase_16 AC 231 ms
170,768 KB
testcase_17 AC 177 ms
118,556 KB
testcase_18 AC 173 ms
113,132 KB
testcase_19 AC 156 ms
139,392 KB
testcase_20 AC 164 ms
139,392 KB
testcase_21 AC 231 ms
165,576 KB
testcase_22 AC 87 ms
93,440 KB
testcase_23 AC 180 ms
137,304 KB
testcase_24 AC 103 ms
100,736 KB
testcase_25 AC 78 ms
86,912 KB
testcase_26 AC 195 ms
149,232 KB
testcase_27 AC 81 ms
89,984 KB
testcase_28 AC 68 ms
76,672 KB
testcase_29 AC 100 ms
100,096 KB
testcase_30 AC 78 ms
84,736 KB
testcase_31 AC 176 ms
137,696 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 i < N and A[i] < M//2:
	if (A[i] + M//2) % M in Aset:
		ans += N-2
	i += 1

print(ans)
0