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