Array to store the count of numbers whom 1 <= X <= K is a multiple of
int [ ] numCount = new int [ k + 1 ] ; for ( int i = 0 ; i <= k ; ++ i ) numCount [ i ] = 0 ; Dictionary < int , int > . KeyCollection keyColl = M . Keys ;