Advertisement
bullit3189

SpiceMustFlow-DataTypes-TF-Jan19

Jan 30th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5.  
  6. public class Program
  7. {
  8. public static void Main()
  9. {
  10. int startAmount = int.Parse(Console.ReadLine());
  11. long totalExtracted = 0;
  12. int days=0;
  13.  
  14. while(startAmount>=100)
  15. {
  16. days++;
  17. totalExtracted += startAmount-26;
  18. startAmount-=10;
  19. }
  20.  
  21. totalExtracted -=26;
  22.  
  23. Console.WriteLine(days);
  24. if (days==0)
  25. {
  26. totalExtracted=0;
  27. }
  28. Console.WriteLine(totalExtracted);
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement