Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Everest
- {
- class Program
- {
- static void Main(string[] args)
- {
- int start = 5364;
- int days = 1;
- while (true)
- {
- string sleep = Console.ReadLine();
- if (sleep == "END")
- {
- break;
- }
- if (sleep == "Yes")
- {
- days++;
- if (days == 6)
- {
- break;
- }
- }
- start += int.Parse(Console.ReadLine());
- if (start >= 8848)
- {
- break;
- }
- }
- if (start >= 8848)
- {
- Console.WriteLine($"Goal reached for {days} days!");
- }
- else
- {
- Console.WriteLine("Failed!");
- Console.WriteLine($"{start}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement