Advertisement
Guest User

Untitled

a guest
May 20th, 2023
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. using System;
  2.  
  3. namespace P09.SpiceMustFlow
  4. {
  5. internal class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. uint startingYield = uint.Parse(Console.ReadLine());
  10. uint totalSpice = 0;
  11. int daysOperated = 0;
  12. for (uint i = startingYield; 100 <= i; i -= 10)
  13. {
  14. totalSpice += i;
  15. totalSpice -= 26;
  16. daysOperated++;
  17. }
  18. if (totalSpice > 26)
  19. {
  20. totalSpice -= 26;
  21. }
  22. Console.WriteLine(daysOperated);
  23. Console.WriteLine(totalSpice);
  24. }
  25. }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement