City X and the cell phone companies
Difficulty: Hard

City X is an amazing city with N citizens. There are K cell phone companies at City X. The citizens use the
cell phones in their normal lifes, so they are made contracts with the cell phone companies. Each citizen has made a
contract with just one company.  

**Input specification**

The input consists of just one line with two integers, N (1<=N<=1000) and K (1<=K<=1000).

**Output specification**

The output consists of just one line with the probability of existing two citizens who use the same cell phone company
rounded up to 3 decimal places.


**Sample input**
<br>50 1000

**Sample output**
<br>0.712

Input Format:

Output Format:

Sample Input:

Sample Output:

Python 3 starter code:


Reference solution (Python):
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.Arrays;


public class Main {
	
	static int N, K;
	static double sol;
	static String cad[];
	
	
	static String Round(double sol) {
		sol = Math.round(sol * 1000.0) / 1000.0;
		DecimalFormat format = new DecimalFormat("0.000");
		DecimalFormatSymbols dfs = format.getDecimalFormatSymbols();
		dfs.setDecimalSeparator('.');
		format.setDecimalFormatSymbols(dfs);
	
		return format.format(sol);
	}
	
	public static void main(String[] args) throws IOException {
		
		InputStreamReader sr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(sr);
		
		cad = br.readLine().split(" ");
		N = Integer.parseInt(cad[0]);
		K = Integer.parseInt(cad[1]);
		
		if(N > K) {
			System.out.println("1.000");
		} else {
			sol = 1;
			for(int i = 0;i<N;i++) {
				sol *= (1.0 - (double) i /(double)K);
			}
			System.out.println(Round(1.0 - sol));
		}		
	}
}