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 C (Clang 3.8.0) (judge verdict: Wrong Answer)

#include<stdio.h>

void sortChange(int max , int Xm[] , int sort[]){
	int i , l , k;
	sort[0] = Xm[0];
	for( i = 1 ; i != max ; i++){
		for( l = 0 ; l < i ; l++){
			if(sort[l] < Xm[i]){  //自分の方が大きい
				continue;
			}
			for( k = i ; k != l ; k--){
				sort[k] = sort[k-1];
			}
			break;
		}
		sort[l] = Xm[i];
	}
}

int main(){
	int n , m;
	int Xm[100000];  //scanfした順番
	int sort[10000]; //小さい順に並び替えたもの
	int dif[9999];   //差
	
	//関数
	int i;
	int sum = 0;
	
	scanf("%d %d" , &n , &m);
	if(n >= m){
		printf("0\n");
		return 0;
	}
	
	for( i = 0 ; i != m ; i++){
		scanf("%d" , &Xm[i]); 
	}
	
	sortChange(m , Xm , sort);

	
	/*並び替え完了*/
	/*差の比較開始*/
	
	if( n == 1 ){
		printf("%d" , sort[m]-sort[0]);
		return 0;
	}
	
	
	for( i = 0 ; i != (m-1) ; i++){
		dif[i] = sort[i+1] - sort[i];
	}	
	
	sortChange( m , dif , sort);
	for( i = 0 ; i < (m-n+1) ; i++){
		sum += sort[i];
	}
	printf("%d\n" , sum);
		
	return 0;
}