Advertisement
Guest User

Untitled

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