Problem:


標高差

今まで登ったことのある山の標高を記録したデータがあります。このデータを読み込んで、一番高い山と一番低い山の標高差を出力するプログラムを作成してください。

Input

入力は以下の形式で与えられます。

山の高さ
...
...

山の高さが複数行に渡って与えられます。入力される値はすべて 0 以上 1,000,000 以下の実数です。入力される山の高さの数は 50 以下です。

Output

一番高い山と一番低い山の標高差を実数で出力する。出力は0.01以下の誤差を含んでもよい。

Sample Input

3776.0
1819.0
645.2
2004.1
1208.6

Output for the Sample Input

3130.8



Sample input:
3776.0
1819.0
645.2
2004.1
1208.6


Sample output:
3130.8

Submission status: Wrong Answer

Solution code:
A=[]
for i in range(0,5):
  a=float(input())
  A.append(a)
 
print(max(A)-min(A))

Submission status: Wrong Answer

Solution code:
A=[]
for i in range(0,5):
  a=float(input())
  A.append(a)
  
print(max(A)-min(A))

Submission status: Wrong Answer

Solution code:
import sys

ms = []
try:
    for v in sys.stdin:
        ms.append(float(v))
except:
    print(max(ms)-min(ms))

Submission status: Wrong Answer

Solution code:
try:
  while True:
    lst=[]
    a=list(input())
    lst.append(a)
  lst.sort()
  print(max(lst)-min(lst))
except EOFError:
  pass

Submission status: Wrong Answer

Solution code:
maxn = 0
minn = 0

while True:
    try:

        a = float(raw_input())

        if a > maxn:
            maxn = a

        if a < minn:
            minn = a


    except EOFError:
        break

print maxn - minn

Submission status: Memory Limit Exceeded

Solution code:
import sys

output = list()
for line in sys.stdin.readlines():
    line = line.strip()
    output.append(float(line))

print max(output) - min(output)

Submission status: Memory Limit Exceeded

Solution code:
import sys

max_v, min_v = None
for line in sys.stdin.readlines():
    line = line.strip()
    line = float(line)
    max_v = max(max_v, line) if max_v is not None else line
    min_v =  min(min_v, line) if min_v is not None else line

print max_v - min_v

Submission status: Memory Limit Exceeded

Solution code:
import sys

max_v, min_v = None, None
for line in sys.stdin.readlines():
    line = line.strip()
    line = float(line)
    max_v = max(max_v, line) if max_v is not None else line
    min_v =  min(min_v, line) if min_v is not None else line

print max_v - min_v

Submission status: Accepted

Solution code:
mi = 2000000
ma = 0
while(True):
    try:
        a = float(input())
        mi = min(a,mi)
        ma = max(a,ma)
    except:
        print(ma-mi)
        break

Submission status: Accepted

Solution code:
moutain = []
try:
    while True:
        moutain.append(float(raw_input()))
except:
    print max(moutain) - min(moutain)

Submission status: Accepted

Solution code:
from decimal import Decimal, ROUND_HALF_UP
n=[]
while 1:
    try:
        n.append(float(input()))
    except:break
print(Decimal(str(max(n)-min(n))).quantize(Decimal('0.01'), rounding=ROUND_HALF_UP))

Submission status: Accepted

Solution code:
m = []

while True:
    try:
        m.append(float(input()))
    except:
        print(max(m) - min(m))
        break

Submission status: Accepted

Solution code:
m = []
while True:
 try:
  m.append(input())
 except:
  break;

m.sort();
print m[-1] - m[0]

Submission status: Accepted

Solution code:
list = []
while(True):
    try:
        n = input()
        list.append(n)
    except Exception:
        break
list.sort()
print(list[-1] - list[0])

Submission status: Accepted

Solution code:
import sys
h_max = 0
h_min = sys.maxint

for line in sys.stdin:
	h = float(line)
	if h < h_min:
		h_min = h
	if h_max < h:
		h_max = h
diff = h_max - h_min
print diff

Submission status: Accepted

Solution code:
from sys import *

lis = []
for s in stdin:
    lis.append(float(s))
print max(lis)-min(lis)

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
import sys
result = []
for line in sys.stdin:
    result.append(float(line))
a = max(result) - min(result)
print(a)

Submission status: Accepted

Solution code:
import sys
f = sys.stdin

mountains = [float(line) for line in f]
print(max(mountains) - min(mountains))

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

import sys
L = [ float(x) for x in sys.stdin.readlines() ]
L.sort()
print L[-1] - L[0]

Submission status: Accepted

Solution code:
ls = []
while True:
    try:
        data = float(raw_input())
        ls.append(data)
    except EOFError:
        break
        
print max(ls)-min(ls)

Submission status: Accepted

Solution code:
max=-1e10
min=1e10

while True:
    try:
        n = float(input())
    except:
        break

    if max < n:
        max = n
    elif min > n:
        min = n

print( max - min)

Submission status: Accepted

Solution code:
L=[]
while True:
    try:
        L.append(float(input()))
    except:
        break
L.sort()
print L.pop()-L.pop(0)

Submission status: Accepted

Solution code:
import sys

high = 0
low = 0
for index, line in enumerate(sys.stdin):
    xxx = float(line)
    if index == 0:
        high = xxx
        low = xxx
    if xxx > high:
        high = xxx
    elif xxx < low:
        low = xxx
print high - low

Submission status: Accepted

Solution code:
import sys
l = []
for line in sys.stdin.readlines():
  l.append(float(line.replace('\n','')))
print(max(l) - min(l))

Submission status: Accepted

Solution code:
A=[]

while True:
	try:
		height = float(input())
		A.append(height)

	except EOFError:
		break
	
A.sort(reverse=True)
print(A[0]-A[-1])

Submission status: Accepted

Solution code:
#coding:utf-8

l = []
while True:
    try:
        i = float(input())
        l.append(i)
    except:
        break
print(max(l) - min(l))

Submission status: Accepted

Solution code:
import sys
num = []
for i in sys.stdin: num.append(float(i))
print max(num) - min(num)

Submission status: Accepted

Solution code:
import sys
i = sorted(map(float, sys.stdin))
print i[-1] - i[0]

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys

mountain = []
for line in sys.stdin:
    mountain.append(float(line))
mountain.sort()
print mountain[len(mountain)-1]-mountain[0]

Submission status: Accepted

Solution code:
import sys
arr = []
for f in sys.stdin:
    arr.append(float(f))
print(max(arr)-min(arr))

Submission status: Accepted

Solution code:
value = []
while True:
  try:
    value += [float(raw_input())]
  except (EOFError):
    break #end of file reached

print max(value)-min(value)

Submission status: Accepted

Solution code:
a = []
while True:
  try:
    n = float(input())
    a.append(n)
  except:
    break

a.sort()
print(a[len(a) - 1] - a[0])

Submission status: Accepted

Solution code:
a = []
while True:
  try:
    n = float(input())
    a.append(n)
  except:
    break

a.sort()
print(max(a) - min(a))

Submission status: Accepted

Solution code:
a = []
while True:
  try:
    n = float(input())
    a.append(n)
  except:
    break

print(max(a) - min(a))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
l = []

while True:
    try:
        l.append(float(input()))
    except:
        break

_max = max(l)
_min = min(l)

print(_max - _min)

Submission status: Accepted

Solution code:
data = []
while True:
    try:
        data.append(float(input()))
    except:
        break
print(max(data) - min(data))

Submission status: Accepted

Solution code:
def get_input():
    while True:
        try:
            yield input()
        except EOFError:
            break

inputs = [float(i) for i in get_input()]

print(max(inputs) - min(inputs))

Submission status: Accepted

Solution code:
Mon_lis = []
while True:
    try:
        Mon_lis.append(float(input()))
    except EOFError:
        print(max(Mon_lis) - min(Mon_lis))
        break

Submission status: Accepted

Solution code:
import sys

ms = []
for v in sys.stdin:
    ms.append(float(v))
print(max(ms)-min(ms))

Submission status: Accepted

Solution code:
a=[]
while True:
    try:
        a.append(float(input()))
    except:
        break
print(max(a)-min(a))

Submission status: Accepted

Solution code:
a=[]
while 1:
    try:
        a.append(float(input()))
    except: break
print(max(a)-min(a))

Submission status: Accepted

Solution code:
d = []
while True:
    try:
        d.append(float(input()))
    except EOFError:
        break
print(max(d)-min(d))

Submission status: Accepted

Solution code:
f = []
while True:
    try:
        f.append(float(input().strip()))

    except EOFError:
        break
print(max(f) - min(f))

Submission status: Accepted

Solution code:
A = []
while True:
    try:
        A.append(float(input()))
    except EOFError:
        break

print(max(A) - min(A))

Submission status: Accepted

Solution code:
i = []
while True:
    try:
        i.append(float(input()))
    except EOFError: break
i.sort()
print(i[-1]-i[0])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
import os
import math
import itertools

heights = []

for s in sys.stdin:
    heights.append(float(s))

print(max(heights) - min(heights))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0046
?¨???????
"""
import sys

def main(args):
    mountains = []
    for line in sys.stdin:  # ??????????????\???
        mountains.append(float(line.strip()))

    max_height = max(mountains)
    min_height = min(mountains)

    print(max_height - min_height)

if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
a, b = float(input()), float(input()) 
Max, Min = max(a, b), min(a, b) 
while True :
    try :
        c = float(input())
        if Min < c < Max : pass
        elif Max < c : Max = c
        elif c < Min : Min = c
    except : break
print(Max - Min)

Submission status: Accepted

Solution code:
try:
    ls = []
    while True:
        ls.append(float(input()))
except:
    print(max(ls) - min(ls))

Submission status: Accepted

Solution code:
try:
  lst=[]
  while True:
   a=float(input())
   lst.append(a)
except :
  print(max(lst)-min(lst))

Submission status: Accepted

Solution code:
maxv, minv = 0, 10**6
while True:
    try:
        height = float(input())
    except:
        break
    maxv = height if maxv < height else maxv
    minv = height if minv > height else minv
print(maxv-minv)

Submission status: Accepted

Solution code:
import sys
high = 0
low = 10**6
for line in sys.stdin:
    if line == "\n":
        break
    height = float(line)
    if height > high:
        high = height
    if height < low:
        low = height
print(high-low)

Submission status: Accepted

Solution code:
import sys
def main():
    m = [] #mountain

    for line in sys.stdin:
        m.append(float(line))

    m.sort()

    ans = m[-1] - m[0]
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# Aizu Problem 0046: Differential
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


heights = [float(line) for line in sys.stdin]
diff = max(heights) - min(heights)
print(diff)

Submission status: Accepted

Solution code:
import sys
import math
maxv = 0
minv = math.inf
for i in map(float, sys.stdin):
    maxv = max([i, maxv])
    minv = min([i, minv])
print(maxv-minv)

Submission status: Accepted

Solution code:
import sys

data = []
for line in sys.stdin:
  try:
    data.append(float(line))
  except:
    break
print(max(data) - min(data))

Submission status: Accepted

Solution code:
def main():
    m_MAX = 0.0
    m_MIN = 0.0
    count = 0
    while True:
        try:
            m = float(input())
            if count == 0:
                m_MAX = m_MIN = m
            if m > m_MAX :
                m_MAX = m
            elif m < m_MIN :
                m_MIN = m
            count += 1
        except EOFError:
            break
    print(abs(m_MAX - m_MIN))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    m_MAX = 0.0
    m_MIN = 9999999999999.0
    while True:
        try:
            m = float(input())
            if m > m_MAX :
                m_MAX = m
            elif m < m_MIN :
                m_MIN = m
        except EOFError:
            break
    print(m_MAX - m_MIN)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a=[]
while True:
    try:
        a.append(float(input()))
    except:break
print(max(a)-min(a))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
li =[]
while True:
    try:
        data =float(raw_input())
        li.append(data)
    except:
        break
print max(li)-min(li)

Submission status: Accepted

Solution code:
d = []
while True:
    try:
        d.append(float(input()))
    except:
        break
print(max(d) - min(d))

Submission status: Accepted

Solution code:
def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())
m = []
for l in range(len(N)):
    m.append(float(N[l]))

m.sort()
print(m[len(m)-1]-m[0])

Submission status: Accepted

Solution code:
import sys
a=[float(e)for e in sys.stdin]
print(max(a)-min(a))

Submission status: Accepted

Solution code:
s = l = float(input())
while 1:
    try:
        t = float(input())
        s = min(s, t)
        l = max(l, t)
    except:break
print(l - s)

Submission status: Accepted

Solution code:
height_lst = []

while True:
  try:
    height = float(input())
    height_lst.append(height)

  except EOFError:
    break

height_lst.sort()
print(height_lst[-1] - height_lst[0])

Submission status: Accepted

Solution code:
import sys
a=[float(i) for i in sys.stdin]
print(max(a)-min(a))

Submission status: Accepted

Solution code:
# AOJ 0046 Differential
# Python3 2018.6.14 bal4u

data = []
while True:
	try:
		a = float(input())
	except EOFError:
		break
		
	data.append(a)
print(max(data)-min(data))

Submission status: Accepted

Solution code:
# AOJ 0046 Differential
# Python3 2018.6.14 bal4u

data = []
while True:
	try:
		data.append(float(input()))
	except EOFError:
		break
print(max(data)-min(data))

Submission status: Accepted

Solution code:
li = []
while 1:
	try: li.append(float(input()))
	except: break
print(max(li) - min(li))

Submission status: Accepted

Solution code:
import sys
a = tuple(map(float, sys.stdin.readlines()))
print(max(a) - min(a))

Submission status: Accepted

Solution code:
t=[]
while True:
  try:
    a=float(input())
    t.append(a)
  except EOFError: 
    ans = max(t)-min(t)
    print ans
    break

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

import sys


def main():
    lines = [float(line) for line in sys.stdin.readlines()]
    lines.sort()
    low = lines.pop(0)
    high = lines.pop()
    print high - low

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
list=sorted([float(line.strip()) for line in sys.stdin.readlines()])
print list[-1]-list[0]

Submission status: Accepted

Solution code:
h = []
while True:
    try:
        i = float(raw_input())
    except EOFError as e:
        break
    h.append(i)

print("%f" % (max(h)-min(h), ))

Submission status: Accepted

Solution code:

import sys


height_max = 0
height_min = sys.maxint


for line in sys.stdin:
    h = float(line)
    if h < height_min:
        height_min = h
    if height_max < h:
        height_max = h
differential = height_max - height_min
print differential

Submission status: Accepted

Solution code:
maxn = 0
minn = 0
f = 0
while True:
    try:

        a = float(raw_input())

        if f == 0:
            maxn = a
            minn = a
            f = 1

        if a > maxn:
            maxn = a

        if a < minn:
            minn = a

    except EOFError:
        break

print maxn-minn

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin

upper = lower = float(stdin.readline())
for line in stdin:
    h = float(line)
    if h > upper:
        upper = h
    elif h < lower:
        lower = h
print(upper - lower)

Submission status: Accepted

Solution code:
import sys

r = []
for s in sys.stdin:
    r.append(float(s))
print max(r) - min(r)

Submission status: Accepted

Solution code:
import sys

l = map(lambda i:float(i), sys.stdin)
print max(l) - min(l)

Submission status: Accepted

Solution code:
import sys

heights = [];
for line in sys.stdin:
    heights.append(float(line))

highest = max(heights)
lowest = min(heights)

print highest - lowest

Submission status: Accepted

Solution code:
import sys

m = 0
n = 1e6
for s in sys.stdin:
    a = float(s)
    if a>m: m=a
    elif a<n: n=a
print m-n

Submission status: Accepted

Solution code:
import sys

s = map(float, sys.stdin)
print max(s)-min(s)

Submission status: Accepted

Solution code:
import sys

s = sorted(map(float, sys.stdin))
print s[-1]-s[0]

Submission status: Accepted

Solution code:
a=[]
while True:
    try:
        a.append(float(raw_input()))
    except:
        break

a.sort()
print a[len(a)-1] - a[0]

Submission status: Accepted

Solution code:
import sys
s = map(float, sys.stdin)
s.sort()
print s[-1]-s[0]

Submission status: Accepted

Solution code:
try:
    mx, mn = 0, 100000
    while True:
        p = float(raw_input())
        mx = max(mx, p)
        mn = min(mn, p)
except EOFError:
    pass
print mx - mn

Submission status: Accepted

Solution code:
mountains = []
while 1:
    try:
        mountains.append(input())
    except EOFError:
        break
mountains.sort()
print mountains[-1] - mountains[0]

Submission status: Accepted

Solution code:
h0 = float(input())
min = h0
max = h0
while True:
    try:
        h = float(input())
    except:
        break
    if h<min:
        min = h
    if max<h:
        max = h
print(f'{max-min:.2f}')

Submission status: Accepted

Solution code:
ma = 0
mi = 1000000

while True:
    try:
        h = float(input())
        if ma < h:
            ma = h

        if mi > h:
            mi = h

    except EOFError:
        print(ma - mi)
        break

Submission status: Accepted

Solution code:
x = []
while 1:
    try:
        h = float(input())
        x.append(h)
    except EOFError:
        break
print(max(x)-min(x))

Submission status: Accepted

Solution code:
max_high = 0
min_high = 10**6

while True :
    try :
        n = float(input())
        if max_high < n :
            max_high = n
        if min_high > n :
            min_high = n
    except EOFError :
        break

print(max_high - min_high)

Submission status: Accepted

Solution code:
import sys
readlines = sys.stdin.readlines
write = sys.stdout.write
def solve():
    D = [float(line) for line in readlines()]
    write("%.16f\n" % (max(D) - min(D)))
solve()

Submission status: Accepted

Solution code:
mt = [] #空リスト作成
try: #ここから下でエラーを検出する
    while True: #無限ループ
        mt.append(float(input())) #float型にして標準入力
except EOFError: #EOFErrorを検出する
    mt.sort() #小さい順並べる
    print(mt[-1] - mt[0]) #1番大きい数から一番小さい数の差を求める

Submission status: Accepted

Solution code:
a = []
while True:
    try:
        a.append(float(input()))
    except:
        break
print(max(a)-min(a))

Submission status: Accepted

Solution code:
def multi_input():
    while True:
        try:
            yield float(input())
        except EOFError:
            break

a = list(multi_input())
print(max(a)-min(a))

Submission status: Accepted

Solution code:
#!usr/bin/env python3
import sys
import math
import string
import collections
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

height = list(map(float,open(0).read().split()))
print(max(height) - min(height))

Submission status: Accepted

Solution code:
import sys
list = [float(i) for i in sys.stdin]
print(max(list) - min(list))

Submission status: Accepted

Solution code:
t = []
while(1):
    try:
        t.append(float(input()))
    except:
        break
t = sorted(t)
print(t[len(t) - 1] - t[0])

Submission status: Accepted

Solution code:
a = []
while True:
    try:
        a.append(float(input()))
    except:
        break
a.sort(reverse = True)
print(a[0]-a[-1])

Submission status: Accepted

Solution code:
list=[]
while True:
    try:
        mt=float(input())
    except:
        small=min(list)
        big=max(list)
        print(big-small)
        break
    list.append(mt)

Submission status: Accepted

Solution code:
L = []
while True:
    try:
        f = float(input())
        L.append(f)
        
    except EOFError:
        break

print( max(L) - min(L) )

Submission status: Accepted

Solution code:
a=[]
while True:
    try:
        a.append(float(input()))
    except: break
print(max(a)-min(a))

Submission status: Accepted

Solution code:
minv = 10000000
maxv = 0

while 1:
    try:
        n = float(input())
        if minv > n:
            minv = n
        if maxv < n:
            maxv = n

    except:
        break

print(maxv-minv)

Submission status: Accepted

Solution code:
height_lst = []
 
while True:
  try:
    height = float(input())
    height_lst.append(height)
 
  except EOFError:
    break

height_lst.sort()
print(height_lst[-1] - height_lst[0])

Submission status: Accepted

Solution code:
a=[]
while True:
    try:
        a.append(float(input()))
    except:
        break
print(max(a)-min(a))

Submission status: Accepted

Solution code:
min = 10**12
max = 0
while(True):
    try:
        n = float(input())
        if min > n:
            min = n
        if max < n:
            max = n
    except:
        print(max - min)
        break

Submission status: Accepted

Solution code:
A=[]
while True:
  try:
    A.append(float(input()))
  except EOFError:
    break
sa=max(A)-min(A)
print(f"{sa:.1f}")

Submission status: Accepted

Solution code:
# coding=utf-8

###
### for atcorder program
###

import sys
import math

# math class
class mymath:
    ### pi
    pi = 3.14159265358979323846264338

    ### Prime Number
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []

        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist

    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    ### LCM
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

    ### Mat Multiplication
    def mul(self, A, B):
        ans = []
        for a in A:
            c = 0
            for j, row in enumerate(a):
                c += row*B[j]
            ans.append(c)
        return ans

mymath = mymath()

### output class
class output:
    ### list
    def list(self, l):
        l = list(l)
        #print(" ", end="")
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()

### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]

#R = float(input())
#A.append(list(map(int,input().split())))

#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]

#abc list
#abc = [chr(ord('a') + i) for i in range(26)]

### output sample
#print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
#print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
#print(" {}".format(i), end="")

def get_input():
    N = []
    while True:
        try:
            #N.append(input())
            #N.append(int(input()))
            N.append(float(input()))
        except EOFError:
            break
    return N

N = get_input()

print(max(N)-min(N))

Submission status: Accepted

Solution code:
if __name__ == '__main__':

	ans = []
	while True:
		try:
			ans.append(float(input()))

		except EOFError:
			break

	print(max(ans) - min(ans))

Submission status: Accepted

Solution code:
high_max=0
high_low=1000000
while True:
    try:
        N=float(input())
        if N>high_max:high_max=N
        elif N<high_low:high_low=N
    except:
        ans=high_max-high_low
        print("{:.1f}".format(ans))
        break

Submission status: Accepted

Solution code:
max = -10**20
min = 10**20
while(1):
    try:
        a = float(input())
        if a > max:
            max = a
        if a < min:
            min = a
    except EOFError:
        print("{:.1f}".format(max-min))
        break

Submission status: Accepted

Solution code:
heightlist = []
while 1:
    try:
        height = float(input())
        heightlist.append(height)
    except:
        break

diff = max(heightlist) - min(heightlist)
print(diff)

Submission status: Accepted

Solution code:
mountain = []
while True:
    try: n = float(input())
    except:
        print(max(mountain)-min(mountain))
        break
    mountain.append(n)

Submission status: Accepted

Solution code:
import sys
mi=10**7
ma=-1
for l in sys.stdin:
    mi=min(mi,float(l))
    ma=max(ma,float(l))
print(ma-mi)

Submission status: Runtime Error

Solution code:
import sys
a=list(map(float,sys.stdin.readline()))
print(max(a)-min(a))

Submission status: Runtime Error

Solution code:
ls = []
while True:
    try:
        data = map(float,raw_input().split())
        ls.append(data)
    except EOFError:
        break
ls.sort()
ans = ls[-1]-ls[0]
print ans

Submission status: Runtime Error

Solution code:
ls = []
while True:
    try:
        data = float(raw_input().split())
        ls.append(data)
    except EOFError:
        break
ls.sort()
ans = ls[-1]-ls[0]
print ans

Submission status: Runtime Error

Solution code:
A=[]
for i in range(0,5):
  a=float(input())
  A.append(a)

print(max(A)-min(B))

Submission status: Runtime Error

Solution code:
A=[]
while not a == false:
  a=float(input())
  A.append(a)

print(max(A)-min(A))

Submission status: Runtime Error

Solution code:
A=[]
do:
  a=float(input())
  A.append(a)  
while a != Null:
print(max(A)-min(A))

Submission status: Runtime Error

Solution code:
A=[]
do:
  a=float(input())
  A.append(a)  
while a != Null
print(max(A)-min(A))

Submission status: Runtime Error

Solution code:

A=[]
  while True:
  a=float(input())
  A.append(a)  
  if a==Null:
    break
print(max(A)-min(A))

Submission status: Runtime Error

Solution code:
inputs = [flaot(i) for i in input()]

print(max(inputs) - min(inputs))

Submission status: Runtime Error

Solution code:
inputs = [float(i) for i in input()]

print(max(inputs) - min(inputs))

Submission status: Runtime Error

Solution code:
fir=0
sec=0

while True:
        a=raw_input()
        if a >= fir:
                sec = fir
                fir = a
        elif a >= sec:
                sec = a

print fir-sec

Submission status: Runtime Error

Solution code:
fir=0
sec=0

while True:
        try:
                a=raw_input()
                if a >= fir:
                        sec = fir
                        fir = a
                elif a >= sec:
                        sec = a
        except EOFError:
                break

print fir-sec

Submission status: Runtime Error

Solution code:
import sys
fir=0
sec=0

for line in sys.stdin:
        a=float(raw_input())
        if a >= fir:
                sec = fir
                fir = a
        elif a >= sec:
                sec = a
print fir-sec

Submission status: Runtime Error

Solution code:
import sys
fir=0
sec=0

for a in sys.stdin:
        a=float(raw_input())
        if a >= fir:
                sec = fir
                fir = a
        elif a >= sec:
                sec = a
print fir-sec

Submission status: Runtime Error

Solution code:
import sys
fir=0
las=0

for a in sys.stdin:
        a=float(raw_input())
        if a >= fir:
                fir = a
                a = las
        elif a <= las:
                las = a
print fir-las

Submission status: Runtime Error

Solution code:
a=[]
while True:
        try:
                i=raw_input()
        except EOFError:
                break
        a.append(i)

print "%f" %(max(a)-min(a))

Submission status: Runtime Error

Solution code:
a=[]
while True:
        try:
                i=raw_input()
        except EOFError:
                break
        a.append(i)

print "%f" %(max(a)-min(a), )

Submission status: Runtime Error

Solution code:
a=[]
while True:
        try:    
                i=raw_input()
                a.append(i)

print "%f" %(max(a)-min(a))

Submission status: Runtime Error

Solution code:
i = 0
while 1:
    try:
         a[i] = float(raw_input())
a.sort()
print a[len(a)-1] - a[0]

Submission status: Runtime Error

Solution code:
i = 0
a=[]
while 1:
    try:
         a.append(float(raw_input()))
         i += 1
a.sort()
print a[len(a)-1] - a[0]

Submission status: Runtime Error

Solution code:
a=[]
while 1:
    try:
         a.append(float(raw_input()))
a.sort()
print a[len(a)-1] - a[0]

Submission status: Runtime Error

Solution code:
a=[]
while 1:
    try:
         h = float(row_input())
         a.append(h)
a.sort()
print a[len(a)-1] - a[0]

Submission status: Runtime Error

Solution code:
a=[]
while True:
    try:
         h = float(row_input())
         a.append(h)
a.sort()
print a[len(a)-1] - a[0]

Submission status: Runtime Error

Solution code:
a=[]
while True:
    try:
	h = float(row_input())
	a.append(h)
    except:
	break
a.sort()
print a[len(a)-1] - a[0]