|
|
back to boardПомогите найти ошибку using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Globalization; namespace _1484Kino { class Program { static void Main(string[] args) { var userInput = Console.ReadLine().Split(); var x = double.Parse(userInput[0],CultureInfo.InvariantCulture); var y = double.Parse(userInput[1], CultureInfo.InvariantCulture); var n = int.Parse(userInput[2], CultureInfo.InvariantCulture); int count = 0; if (y > 0.9 && x<=10.0) { while (Math.Round(x, 1 )> 1) { x = ((x * n + 1) / (n + 1)); n += 1; count++; } Console.WriteLine(count); } else Console.WriteLine("Impossible"); } } } |
|
|