Company: iRageCapital_30july
Difficulty: medium
The Module Problem Problem Description You are given a number N. You have to find F(X) mod M. Note: F(X) is defined as a product of prime up to X. Input Format First line: Three space-separated integers N, X, and M Output Format Print the desired result in a single line. Examples Example 1: Input: 2 4 5 Output: 4 Explanation: The primes which are less than or equal to 4 are 2 and 3. F(X) = 2 * 3 = 6 The problem asks for N F(X) mod M. In this case, 2 6 mod 5. 2 6 = 64 64 % 5 = 4, which is the desired result. Constraints 1 ≤ N, M ≤ 10 9 1 ≤ X ≤ 10 5 Note Your code must be able to print the sample output from the provided sample input. However, your code must pass these hidden test cases to solve the problem statement. Time Limit: 10 secs for each input file Memory Limit: 256 MB Source Limit: 1024 KB Scoring Score is assigned if any testcase passes Allowed Languages Bash, C, C++14, C++17, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java 8, Java 14, Java 17, JavaScript, Ko