結果

問題 No.2517 Right Triangles on Circle
ユーザー naesiranaesira
提出日時 2024-04-21 14:39:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 217 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 146,076 KB
最終ジャッジ日時 2024-04-21 14:39:48
合計ジャッジ時間 5,502 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
51,840 KB
testcase_01 AC 46 ms
51,584 KB
testcase_02 AC 40 ms
51,840 KB
testcase_03 AC 40 ms
51,328 KB
testcase_04 AC 41 ms
51,584 KB
testcase_05 AC 40 ms
51,840 KB
testcase_06 AC 41 ms
51,456 KB
testcase_07 AC 40 ms
51,840 KB
testcase_08 AC 40 ms
51,712 KB
testcase_09 AC 40 ms
51,840 KB
testcase_10 AC 41 ms
51,840 KB
testcase_11 AC 40 ms
51,584 KB
testcase_12 AC 40 ms
51,712 KB
testcase_13 AC 175 ms
136,176 KB
testcase_14 AC 155 ms
135,792 KB
testcase_15 AC 217 ms
145,756 KB
testcase_16 AC 190 ms
146,076 KB
testcase_17 AC 154 ms
136,576 KB
testcase_18 AC 143 ms
128,896 KB
testcase_19 AC 129 ms
121,216 KB
testcase_20 AC 129 ms
121,728 KB
testcase_21 AC 186 ms
140,120 KB
testcase_22 AC 73 ms
85,888 KB
testcase_23 AC 177 ms
120,424 KB
testcase_24 AC 86 ms
91,648 KB
testcase_25 AC 68 ms
80,768 KB
testcase_26 AC 167 ms
129,040 KB
testcase_27 AC 71 ms
83,328 KB
testcase_28 AC 70 ms
72,704 KB
testcase_29 AC 84 ms
90,752 KB
testcase_30 AC 71 ms
78,848 KB
testcase_31 AC 151 ms
120,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = set(map(int, input().split()))

if M % 2 == 1:
  print(0)
  exit()

M //= 2
ans = 0
for a in A:
  if a + M in A:
    ans += N - 2

print(ans)
0