#Languages - 4
Languages - 4
I always love an excuse to pull out good old
##QBasic, (削除) 112 (削除ここまで) 96 bytes
QBasic, (削除) 112 (削除ここまで) 96 bytes
##Prolog, 235 bytes
Prolog, 235 bytes
#Languages - 4
I always love an excuse to pull out good old
##QBasic, (削除) 112 (削除ここまで) 96 bytes
##Prolog, 235 bytes
Languages - 4
I always love an excuse to pull out good old
QBasic, (削除) 112 (削除ここまで) 96 bytes
Prolog, 235 bytes
Same strategy as Dennis's Python 2 version. Takes a comma-separated list of numbers; handles both ints and floats. A single-number input must be wrapped in square braces (and a list of numbers always may be); a fix would cost 4 bytes.
Same strategy as Dennis's Python 2 version. Takes a comma-separated list of numbers; handles both ints and floats. A single-number input must be wrapped in square braces (and a list of numbers always may be); a fix would cost 4 bytes.
#Languages - 34
?- m([8.6],H,G,A,Q,C).
H = G, G = A, A = Q, Q = C, C = 8.6.
Python 3, 103 bytes
h=a=q=n=0;g=1
for x in eval(input()):h+=1/x;g*=x;a+=x;q+=x*x;n+=1
print(n/h,g**(1/n),a/n,(q/n)**.5,q/a)
Same strategy as Dennis's Python 2 version. Takes a comma-separated list of numbers; handles both ints and floats. A single-number input must be wrapped in square braces (and a list of numbers always may be); a fix would cost 4 bytes.
#Languages - 3
?- m([8.6],H,G,A,Q,C).
H = G, G = A, A = Q, Q = C, C = 8.6.
#Languages - 4
?- m([8.6],H,G,A,Q,C).
H = G, G = A, A = Q, Q = C, C = 8.6.
Python 3, 103 bytes
h=a=q=n=0;g=1
for x in eval(input()):h+=1/x;g*=x;a+=x;q+=x*x;n+=1
print(n/h,g**(1/n),a/n,(q/n)**.5,q/a)
Same strategy as Dennis's Python 2 version. Takes a comma-separated list of numbers; handles both ints and floats. A single-number input must be wrapped in square braces (and a list of numbers always may be); a fix would cost 4 bytes.