Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _9._Spice_Must_Flow
- {
- class Program
- {
- static void Main(string[] args)
- {
- long startingYield = long.Parse(Console.ReadLine());
- long totalYield = 0;
- int consumesCrew = 26;
- int daysWork = 0;
- if (startingYield <100)
- {
- Console.WriteLine(daysWork);
- Console.WriteLine(totalYield);
- }
- else
- {
- while (startingYield >= 100)
- {
- totalYield += startingYield;
- totalYield -= consumesCrew;
- daysWork++;
- startingYield -= 10;
- }
- totalYield -= consumesCrew;
- Console.WriteLine(daysWork);
- Console.WriteLine(totalYield);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement