Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num = int.Parse(Console.ReadLine());
- int currentYield = num;
- int spiceGathered = 0;
- int daysOfOperation = 0;
- while (currentYield >= 100)
- {
- spiceGathered += currentYield - 26 ;
- currentYield -= 10;
- daysOfOperation++;
- }
- spiceGathered -= 26;
- Console.WriteLine(daysOfOperation);
- Console.WriteLine(spiceGathered);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement