Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(input) {
- startingYield = Number(input);
- let days = 0;
- let total = 0;
- while(startingYield >= 100) {
- total += startingYield - 26;
- startingYield -= 10;
- days++;
- }
- if(total >= 26) {
- total -= 26;
- }
- console.log(days);
- console.log(total);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement