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