Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- public class Program
- {
- public static void Main()
- {
- int startAmount = int.Parse(Console.ReadLine());
- long totalExtracted = 0;
- int days=0;
- while(startAmount>=100)
- {
- days++;
- totalExtracted += startAmount-26;
- startAmount-=10;
- }
- totalExtracted -=26;
- Console.WriteLine(days);
- if (days==0)
- {
- totalExtracted=0;
- }
- Console.WriteLine(totalExtracted);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement