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