Problem:
Score : 100 points

Problem Statement

In order to pass the entrance examination tomorrow, Taro has to study for T more hours.

Fortunately, he can leap to World B where time passes X times as fast as it does in our world (World A).

While (X \times t) hours pass in World B, t hours pass in World A.

How many hours will pass in World A while Taro studies for T hours in World B?

Constraints

All values in input are integers.

1 \leq T \leq 100

1 \leq X \leq 100

Input

Input is given from Standard Input in the following format:

T X

Output

Print the number of hours that will pass in World A.

The output will be regarded as correct when its absolute or relative error from the judge's output is at most 10^{-3}.

Sample Input 1

8 3

Sample Output 1

2.6666666667

While Taro studies for eight hours in World B where time passes three times as fast, 2.6666... hours will pass in World A.

Note that an absolute or relative error of at most 10^{-3} is allowed.

Sample Input 2

99 1

Sample Output 2

99.0000000000

Sample Input 3

1 100

Sample Output 3

0.0100000000

Solution in Python (3.4.3) (judge verdict: Runtime Error)

N, M = map(int, input().split()) 
X_lines = str(input())
X_lines = X_lines.split()
X = []
for i in range(len(X_lines)):
    X.append(int(X_lines[i]))

X_arrays = X
X_arrays.sort()      
X_max = X_arrays[len(X_arrays)-1]
X_min = X_arrays[0]
X_kyokai = [X_min]
if not N == 1:
    for i in range(N-1):
        X_kyokai.append((1/N)*((i+1)*X_max +(N-i-1)*X_min))
X_kyokai.append(X_max)

X_all_lines = [[]]
if not len(X_kyokai)-2 == 0:
    for i in range(len(X_kyokai)-2):
        X_all_lines.append([])
for i in range(len(X_kyokai)-1):
    for j in range(M):
        if X_kyokai[i] <= X_arrays[j] and X_arrays[j] < X_kyokai[i+1]:
            X_all_lines[i].append(X_arrays[j])
X_all_lines[len(X_kyokai)-2].append(X_max) 

sum_dif = 0
count = 0
for i in range(len(X_all_lines)):
    if len(X_all_lines[i]) == 0:
        count = count + 1
    else:
        i_max = X_all_lines[i][len(X_all_lines[i])-1]
        i_min = X_all_lines[i][0]
        dif = i_max - i_min
        sum_dif = sum_dif + dif

diff_arrays = []

for i in range(N):
    if len(X_all_lines[i]) >= 2:
        for j in range(len(X_all_lines[i])-1):
            diff_arrays.append(X_all_lines[i][j+1]-X_all_lines[i][j])
            
diff_arrays.sort()
diff_arrays.reverse()

if count >= 1:
    for i in range(count):
        sum_dif = sum_dif - diff_arrays[i]

print(str(sum_dif))