Advertisement
kmer

Untitled

Jan 31st, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. using System;
  2.  
  3. namespace SpiceMustFlow
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int sourceVolume = int.Parse(Console.ReadLine());
  10. int theRest = sourceVolume;
  11. int all = 0;
  12. int days = 0;
  13. while (sourceVolume >= 100)
  14. {
  15. theRest -= 26;
  16. all += theRest;
  17. sourceVolume -= 10;
  18. theRest = sourceVolume;
  19. days++;
  20. }
  21. if (all >= 26)
  22. {
  23. all -= 26;
  24. }
  25. Console.WriteLine(days);
  26. Console.WriteLine(all);
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement