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