結果

問題 No.2517 Right Triangles on Circle
ユーザー komkompikomkompi
提出日時 2023-10-27 22:04:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 313 ms / 2,000 ms
コード長 205 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 228,940 KB
最終ジャッジ日時 2023-10-27 22:04:24
合計ジャッジ時間 5,866 ms
ジャッジサーバーID
(参考情報)
judge10 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,664 KB
testcase_01 AC 37 ms
53,664 KB
testcase_02 AC 38 ms
53,664 KB
testcase_03 AC 37 ms
53,664 KB
testcase_04 AC 36 ms
53,664 KB
testcase_05 AC 36 ms
53,664 KB
testcase_06 AC 37 ms
53,664 KB
testcase_07 AC 38 ms
53,664 KB
testcase_08 AC 37 ms
53,664 KB
testcase_09 AC 37 ms
53,664 KB
testcase_10 AC 37 ms
53,664 KB
testcase_11 AC 37 ms
53,664 KB
testcase_12 AC 37 ms
53,664 KB
testcase_13 AC 313 ms
209,916 KB
testcase_14 AC 279 ms
209,908 KB
testcase_15 AC 285 ms
228,940 KB
testcase_16 AC 292 ms
228,560 KB
testcase_17 AC 226 ms
157,416 KB
testcase_18 AC 211 ms
148,396 KB
testcase_19 AC 199 ms
139,660 KB
testcase_20 AC 193 ms
139,336 KB
testcase_21 AC 281 ms
213,812 KB
testcase_22 AC 103 ms
111,804 KB
testcase_23 AC 217 ms
172,260 KB
testcase_24 AC 122 ms
121,604 KB
testcase_25 AC 86 ms
102,880 KB
testcase_26 AC 248 ms
187,836 KB
testcase_27 AC 97 ms
106,944 KB
testcase_28 AC 68 ms
86,340 KB
testcase_29 AC 118 ms
120,932 KB
testcase_30 AC 83 ms
98,944 KB
testcase_31 AC 220 ms
172,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
import math

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

diff=M/2

set_A=set(A)

ans=0
for a in A:
    if a+diff in set_A:
        ans+=N-2

print(ans)
0