Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Spice_Must_Flow
- {
- class Program
- {
- static void Main()
- {
- int startingYield = int.Parse(Console.ReadLine());
- int mineQuantity = startingYield;
- int dayWorked = 0;
- int spiceExtraced = 0;
- while (mineQuantity >= 100)
- {
- spiceExtraced += mineQuantity - 26;
- mineQuantity -= 10;
- dayWorked += 1;
- }
- if (spiceExtraced>26)
- {
- spiceExtraced -= 26;
- }
- Console.WriteLine(dayWorked);
- Console.WriteLine(spiceExtraced);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement