fork(4) download
  1. x = gets.to_i
  2. y = gets.to_i
  3. ox = gets.to_i
  4. oy = gets.to_i
  5.  
  6. result = Math.sqrt((x - ox) ** 2 + (y - oy) ** 2) #←コレが>>429の部分
  7.  
  8. puts(result)
Success #stdin #stdout 0s 4716KB
stdin
10
20
30
40
stdout
28.284271247461902