Advertisement
dimitarbogdanov

snowball

Jun 3rd, 2023
944
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. int n = int.Parse(Console.ReadLine()!);
  2.  
  3. double biggestSBV = 0;
  4.  
  5. for (int i = 0; i < n; i++)
  6. {
  7.     int snowballSnow = int.Parse(Console.ReadLine()!);
  8.     int snowballTime = int.Parse(Console.ReadLine()!);
  9.     int snowballQuality = int.Parse(Console.ReadLine()!);
  10.  
  11.     double snowballValue = Math.Pow((snowballSnow / snowballTime), snowballQuality);
  12.  
  13.     if (snowballValue > biggestSBV)
  14.     {
  15.         biggestSBV = snowballValue;
  16.     }
  17. }
  18.  
  19. Console.WriteLine($"{biggestSBV:F2}");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement