Increment the value in map
if ( m . has ( x ) ) m . set ( x , m . get ( x ) + 1 ) else m . set ( x , 1 ) } } for ( var c = 1 ; c <= N ; c ++ ) { for ( var d = 1 ; d <= N ; d ++ ) { var x = c * c + d * d ;