Function to check if a number is Strong
static bool isStrongNumber ( int n ) { Dictionary < int , int > count = new Dictionary < int , int > ( ) ; while ( n % 2 == 0 ) { n = n / 2 ; if ( count . ContainsKey ( 2 ) ) { count [ 2 ] = count [ 2 ] + 1 ; } else { count . Add ( 2 , 1 ) ; } }