If both A and B is reduced to sqrt ( A * B )
int ans3 = getMinOperations ( ( int ) Math . sqrt ( A * B ) , ( int ) Math . sqrt ( A * B ) , A , B , dp ) ; if ( ans3 != Integer . MAX_VALUE ) { ans3 += 2 ; }