Squares in N*N Chessboard Find total number of Squares in a N*N chessboard. Calculation Sample Input 2 Sample Output 5 Solution class Solution { public: long long squaresInChessBoard(long long N) { long long ans = N * (N + 1) * (2*N + 1) / 6; return ans; } }; Accepted