結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,592 KB
testcase_01 AC 35 ms
53,592 KB
testcase_02 WA -
testcase_03 AC 35 ms
53,592 KB
testcase_04 AC 37 ms
53,592 KB
testcase_05 AC 35 ms
53,592 KB
testcase_06 AC 36 ms
53,592 KB
testcase_07 AC 35 ms
53,592 KB
testcase_08 AC 36 ms
53,592 KB
testcase_09 AC 35 ms
53,592 KB
testcase_10 AC 34 ms
53,592 KB
testcase_11 AC 36 ms
53,592 KB
testcase_12 AC 36 ms
53,592 KB
testcase_13 WA -
testcase_14 AC 200 ms
160,868 KB
testcase_15 AC 225 ms
171,236 KB
testcase_16 AC 242 ms
170,736 KB
testcase_17 AC 175 ms
118,428 KB
testcase_18 AC 166 ms
112,968 KB
testcase_19 AC 154 ms
139,008 KB
testcase_20 AC 164 ms
139,476 KB
testcase_21 AC 219 ms
165,352 KB
testcase_22 AC 82 ms
93,676 KB
testcase_23 AC 169 ms
136,932 KB
testcase_24 AC 96 ms
102,448 KB
testcase_25 AC 71 ms
88,096 KB
testcase_26 AC 193 ms
148,732 KB
testcase_27 AC 76 ms
90,888 KB
testcase_28 AC 62 ms
76,828 KB
testcase_29 AC 93 ms
100,124 KB
testcase_30 AC 97 ms
85,652 KB
testcase_31 AC 169 ms
137,584 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