Program to check if N is a Myriagon Number | Java program for the above approach ; Function to check if N is a myriagon number ; Condition to check if the number is a myriagon number ; Driver Code ; Given Number ; Function call
import java . io . * ; class GFG { static boolean isMyriagon ( int N ) { double n = ( 9996 + Math . sqrt ( 79984 * N + 99920016 ) ) / 19996 ; return ( n - ( int ) n ) == 0 ; } public static void main ( String [ ] args ) { int N = 10000 ; if ( isMyriagon ( N ) ) { System . out . println ( " Yes " ) ; } else { System . out . println ( " No " ) ; } } }