Question: This is a coding question, please provide a somewhat efficient (i.e no triple nested for loops) solution for the problem in Java/C++. Make sure to

This is a coding question, please provide a somewhat efficient (i.e no triple nested for loops) solution for the problem in Java/C++. Make sure to use longs as the problem states and to test that it works with input cases.
Farmer John is growing N(1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
