fork download
  1. import strutils, sequtils, algorithm, math
  2.  
  3. proc solve(): int =
  4. var
  5. xy = readLine(stdin).split(' ').map(parseDouble)
  6. x: double
  7. y: double
  8. ans: int
  9.  
  10. x = xy[0]
  11. y = xy[1]
  12. ans = sqrt(x * x + y * y + 1.0).floor().toInt()
  13. return ans
  14.  
  15. echo(solve)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
3 -4
compilation info
prog.nim(1, 25) Error: cannot open 'sequtils'
stdout
Standard output is empty