Advertisement
alexiev_bg

Untitled

Jan 29th, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Snowballs
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. byte number = byte.Parse(Console.ReadLine());
  10. int snowballSnow = 0;
  11. int snowballTime = 0;
  12. int snowballQuality = 0;
  13. int greatSnowballSnow = 0;
  14. int greatSnowballTime = 0;
  15. int greatSnowballQuality = 0;
  16. ulong snowballValue = 0;
  17.  
  18. for (int i = 1; i <= number ; i++)
  19. {
  20. snowballSnow = int.Parse(Console.ReadLine());
  21. snowballTime = int.Parse(Console.ReadLine());
  22. snowballQuality = int.Parse(Console.ReadLine());
  23. int currentValue = snowballSnow / snowballTime;
  24. double powCurrentValue = Math.Pow(currentValue, snowballQuality);
  25.  
  26. if (powCurrentValue >= snowballValue)
  27. {
  28. snowballValue = (ulong)powCurrentValue;
  29. greatSnowballSnow = snowballSnow;
  30. greatSnowballTime = snowballTime;
  31. greatSnowballQuality = snowballQuality;
  32. }
  33.  
  34. }
  35.  
  36. Console.WriteLine($"{greatSnowballSnow} : {greatSnowballTime} = {snowballValue} ({greatSnowballQuality})");
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement