Nearest smaller number to N having multiplicative inverse under modulo N equal to that number | Java program to implement the above approach ; Function to find the nearest smaller number satisfying the condition ; Driver Code
import java . io . * ; class GFG { static int clstNum ( int N ) { return ( N - 1 ) ; } public static void main ( String [ ] args ) { int N = 11 ; System . out . println ( clstNum ( N ) ) ; } }