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.
Solution Stats
Problem Comments
6 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers130
Suggested Problems
-
Replace NaNs with the number that appears to its left in the row.
3069 Solvers
-
Renaming a field in a structure array
1581 Solvers
-
Project Euler: Problem 16, Sums of Digits of Powers of Two
181 Solvers
-
Back to basics 11 - Max Integer
811 Solvers
-
Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
253 Solvers
More from this Author4
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
consider using isequalwithequalnans (isequaln) against NaN instead of isequal against 'NaN' in test 7.
n=-1 ???
how to place negative amount of 'wheat' on a chessboard?
the prob is gd but the test suites are unnecessarily jumbled up.
Removed the cases with negative quantities. Everyone should be able to solve the problem now.
Is test 4 incorrect?
@ChrisR, Yes it was incorrect, and has been corrected.