Function to check if a number is Strong
static boolean isStrongNumber ( int n ) { HashMap < Integer , Integer > count = new HashMap < Integer , Integer > ( ) ; while ( n % 2 == 0 ) { n = n / 2 ; if ( count . containsKey ( 2 ) ) { count . put ( 2 , count . get ( 2 ) + 1 ) ; } else { count . put ( 2 , 1 ) ; } }