結果

問題 No.2517 Right Triangles on Circle
ユーザー 👑 timitimi
提出日時 2023-10-28 18:20:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 210 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 81,856 KB
実行使用メモリ 168,856 KB
最終ジャッジ日時 2023-10-28 18:20:26
合計ジャッジ時間 5,187 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,600 KB
testcase_01 AC 35 ms
53,600 KB
testcase_02 AC 35 ms
53,600 KB
testcase_03 AC 36 ms
53,600 KB
testcase_04 AC 36 ms
53,600 KB
testcase_05 AC 35 ms
53,600 KB
testcase_06 AC 36 ms
53,600 KB
testcase_07 AC 36 ms
53,600 KB
testcase_08 AC 36 ms
53,600 KB
testcase_09 AC 36 ms
53,600 KB
testcase_10 AC 36 ms
53,600 KB
testcase_11 AC 36 ms
53,600 KB
testcase_12 AC 36 ms
53,600 KB
testcase_13 AC 193 ms
159,016 KB
testcase_14 AC 175 ms
159,008 KB
testcase_15 AC 210 ms
168,856 KB
testcase_16 AC 194 ms
168,788 KB
testcase_17 AC 159 ms
117,380 KB
testcase_18 AC 147 ms
113,076 KB
testcase_19 AC 139 ms
136,640 KB
testcase_20 AC 141 ms
138,352 KB
testcase_21 AC 195 ms
163,256 KB
testcase_22 AC 79 ms
94,080 KB
testcase_23 AC 153 ms
136,032 KB
testcase_24 AC 86 ms
100,116 KB
testcase_25 AC 69 ms
88,340 KB
testcase_26 AC 167 ms
147,204 KB
testcase_27 AC 72 ms
91,096 KB
testcase_28 AC 59 ms
76,980 KB
testcase_29 AC 84 ms
99,784 KB
testcase_30 AC 67 ms
85,796 KB
testcase_31 AC 154 ms
136,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int, input().split())
A=list(map(int, input().split()))
D={}
for a in A:
  a*=2
  D[a]=1
  
ans=0
for a in A:
  a*=2
  if a+M in D:
    ans+=(N-2)
print(ans)
0