Skip to main content
deleted 26 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 2, 47 ... 36 bytes

-3 bytes thanks to @JungHwanMin
-1 byte thanks to @HyperNeutrino
-2 bytes thanks to @JonathanFrech
-3 bytes thanks to @OlivierGrégoire

Python 2, 36 bytes

def f(x):s=int(x**.5);print(x/s+s)/2 

Try it online!

Python 2, 47 ... 36 bytes

-3 bytes thanks to @JungHwanMin
-1 byte thanks to @HyperNeutrino
-2 bytes thanks to @JonathanFrech
-3 bytes thanks to @OlivierGrégoire

Python 2, 36 bytes

def f(x):s=int(x**.5);print(x/s+s)/2 

Try it online!

Python 2, 47 ... 36 bytes

-3 bytes thanks to @JungHwanMin
-1 byte thanks to @HyperNeutrino
-2 bytes thanks to @JonathanFrech
-3 bytes thanks to @OlivierGrégoire

def f(x):s=int(x**.5);print(x/s+s)/2 

Try it online!

added 47 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 2, 47 44 43 41 39... 36 bytes

-3 bytes thanks to @JungHwanMin
-1 byte thanks to @HyperNeutrino
-2 bytes thanks to @JonathanFrech
-3 bytes thanks to @OlivierGrégoire

Python 2, 36 bytes

def f(x):s=int(x**.5);print(x+s*sx/s+s)/2./s 

Try it online!Try it online!

Python 2, 47 44 43 41 39 bytes

-3 bytes thanks to @JungHwanMin
-1 byte thanks to @HyperNeutrino
-2 bytes thanks to @JonathanFrech

def f(x):s=int(x**.5);print(x+s*s)/2./s 

Try it online!

Python 2, 47 ... 36 bytes

-3 bytes thanks to @JungHwanMin
-1 byte thanks to @HyperNeutrino
-2 bytes thanks to @JonathanFrech
-3 bytes thanks to @OlivierGrégoire

Python 2, 36 bytes

def f(x):s=int(x**.5);print(x/s+s)/2 

Try it online!

deleted 93 characters in body; added 2 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 2, 47 44 43 4141 39 bytes

-3 bytes thanks to @JungHwanMin@JungHwanMin
-1 byte thanks to @HyperNeutrino@HyperNeutrino
-2 bytes thanks to @JonathanFrech

def f(x):s=int(x**.5)+.0;print;print(x+s*s)/s/2./s 

Try it online!Try it online!

Python 2, 47 44 43 41 bytes

-3 bytes thanks to @JungHwanMin
-1 byte thanks to @HyperNeutrino

def f(x):s=int(x**.5)+.0;print(x+s*s)/s/2 

Try it online!

Python 2, 47 44 43 41 39 bytes

-3 bytes thanks to @JungHwanMin
-1 byte thanks to @HyperNeutrino
-2 bytes thanks to @JonathanFrech

def f(x):s=int(x**.5);print(x+s*s)/2./s 

Try it online!

added 4 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164
Loading
added 119 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164
Loading
added 105 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164
Loading
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164
Loading