Advertisement
silvana1303

spice must flow

Jun 19th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.93 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Diagnostics.CodeAnalysis;
  5. using System.Linq;
  6. using System.Threading;
  7. using System.Xml;
  8.  
  9. namespace ConsoleApp1
  10. {
  11.     class Exam
  12.     {
  13.         static void Main(string[] args)
  14.         {
  15.             int yield = int.Parse(Console.ReadLine());
  16.             int storage = 0;
  17.             int days = 0;
  18.  
  19.             if (yield < 100)
  20.             {
  21.                 Console.WriteLine(days);
  22.                 Console.WriteLine(storage);
  23.             }
  24.             else
  25.             {
  26.                 while (yield >= 100)
  27.                 {
  28.                     storage += yield;
  29.                     storage -= 26;
  30.                     yield -= 10;
  31.                     days++;
  32.                 }
  33.  
  34.                 storage -= 26;
  35.                 Console.WriteLine(days);
  36.                 Console.WriteLine(storage);
  37.             }
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement