no triangle if p is odd
if ( p % 2 != 0 ) return 0 ; else { int count = 1 ; for ( int b = 1 ; b < p / 2 ; b ++ ) { float a = ( float ) p / 2.0f * ( ( float ) ( ( float ) p - 2.0 * ( float ) b ) / ( ( float ) p - ( float ) b ) ) ; int inta = ( int ) ( a ) ; if ( a == inta ) {