If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successive square after had y times the amount of grains as the square before. How many grains of wheat would be on the chessboard at the finish?
Assume the chess board is n by n squares.
consider using isequalwithequalnans (isequaln) against NaN instead of isequal against 'NaN' in test 7.
n=-1 ???
This should also be slimmed down somehow.
Someone can easily beat this lead.
522 Solvers
Project Euler: Problem 1, Multiples of 3 and 5
1063 Solvers
Test if two numbers have the same digits
154 Solvers
2126 Solvers
2997 Solvers