Using the Constant time formula for Maximum bishops on a chessboard, which is:
int maxBishops(N) return 2*(N-1);
Implemented for the value of N lesser than 10^100, as follows: https://ideone.com/lvuiXW
Verified using Wolfram|Alpha but getting wrong answer on SPOJ's BISHOPS submission.
Am I missing something in the algorithm or is it an implementation issue?