回答編集履歴

1

インデックスの修正

2019/11/21 06:23

投稿

WathMorks
WathMorks

スコア1582

test CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  ```python
4
4
 
5
- t= (x[1]-y[1])**2 + (x[1]-y[2])**2 + (x[1]-y[3])**2
5
+ t= (x[0]-y[0])**2 + (x[0]-y[1])**2 + (x[0]-y[2])**2
6
6
 
7
- +(x[2]-y[1])**2 + (x[2]-y[2])**2 + (x[2]-y[3])**2
7
+ +(x[1]-y[0])**2 + (x[1]-y[1])**2 + (x[1]-y[2])**2
8
8
 
9
- +(x[3]-y[1])**2 + (x[3]-y[2])**2 + (x[3]-y[3])**2
9
+ +(x[2]-y[0])**2 + (x[2]-y[1])**2 + (x[2]-y[2])**2
10
10
 
11
11
  d = sqrt(t)
12
12
 
@@ -20,7 +20,7 @@
20
20
 
21
21
  ```python
22
22
 
23
- t= (x[1]-y[1])**2 + (x[2]-y[2])**2 + (x[3]-y[3])**2
23
+ t= (x[0]-y[0])**2 + (x[1]-y[1])**2 + (x[2]-y[2])**2
24
24
 
25
25
  d = sqrt(t)
26
26