Gaussian random numbers

Report a typo

For the given numbers K, N and M, begin iterating through the various seeds starting from K: (K, K+1, K+2...). In each iteration, use that seed for a random generator and get N random Gaussian numbers using the Random.nextGaussian() method. Output the seed for which all N Gaussian numbers are less than or equal to M.

The input contains numbers K, N, M in a single line.

Sample Input 1:

0 5 0

Sample Output 1:

38

Sample Input 2:

0 5 -1.5

Sample Output 2:

498666

Sample Input 3:

10000 1 1.9

Sample Output 3:

10000
Write a program in Java 17
import java.util.*;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// write your code here
}
}
___

Create a free account to access the full topic