Increment the value in map
if ( m . ContainsKey ( x ) ) m [ x ] = m [ x ] + 1 ; else m . Add ( x , 1 ) ; } } for ( long c = 1 ; c <= N ; c ++ ) { for ( long d = 1 ; d <= N ; d ++ ) { long x = c * c + d * d ;