結果

問題 No.2517 Right Triangles on Circle
ユーザー hiro1729hiro1729
提出日時 2023-10-27 21:25:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 175 ms / 2,000 ms
コード長 239 bytes
コンパイル時間 713 ms
コンパイル使用メモリ 81,756 KB
実行使用メモリ 169,004 KB
最終ジャッジ日時 2023-10-27 21:26:15
合計ジャッジ時間 4,382 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,176 KB
testcase_01 AC 36 ms
53,176 KB
testcase_02 AC 37 ms
53,176 KB
testcase_03 AC 40 ms
53,176 KB
testcase_04 AC 36 ms
53,176 KB
testcase_05 AC 37 ms
53,176 KB
testcase_06 AC 40 ms
53,176 KB
testcase_07 AC 37 ms
53,176 KB
testcase_08 AC 38 ms
53,176 KB
testcase_09 AC 40 ms
53,176 KB
testcase_10 AC 39 ms
55,224 KB
testcase_11 AC 39 ms
53,176 KB
testcase_12 AC 38 ms
53,176 KB
testcase_13 AC 158 ms
161,556 KB
testcase_14 AC 40 ms
53,176 KB
testcase_15 AC 173 ms
168,656 KB
testcase_16 AC 169 ms
169,004 KB
testcase_17 AC 157 ms
141,392 KB
testcase_18 AC 152 ms
134,708 KB
testcase_19 AC 123 ms
108,804 KB
testcase_20 AC 121 ms
108,808 KB
testcase_21 AC 175 ms
163,096 KB
testcase_22 AC 38 ms
53,176 KB
testcase_23 AC 144 ms
135,400 KB
testcase_24 AC 81 ms
101,460 KB
testcase_25 AC 39 ms
53,176 KB
testcase_26 AC 159 ms
148,060 KB
testcase_27 AC 38 ms
53,176 KB
testcase_28 AC 60 ms
78,308 KB
testcase_29 AC 80 ms
101,064 KB
testcase_30 AC 69 ms
87,072 KB
testcase_31 AC 138 ms
139,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
n, m = map(int, input().split())
if m % 2 == 1:
	print(0)
	exit()
m //= 2
a = list(map(int, input().split()))
s = set()
for i in a:
	s.add(i)
ans = 0
for i in a:
	if m + i in s:
		ans += n - 2
print(ans)
0