Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- using System.Numerics;
- namespace exampreparation
- {
- class exam
- {
- static void Main(string[] args)
- {
- int snowballs = int.Parse(Console.ReadLine());
- int snow = 0;
- int time = 0;
- int quality = 0;
- int highest = 0;
- double value2 = 0;
- for (int i = 0; i < snowballs; i++)
- {
- int snowBall = int.Parse(Console.ReadLine());
- int timeBall = int.Parse(Console.ReadLine());
- int qualityBall = int.Parse(Console.ReadLine());
- value2 = Math.Pow((snowBall / timeBall), qualityBall);
- if (value2 > highest)
- {
- highest = (int)value2;
- snow = snowBall;
- time = timeBall;
- quality = qualityBall;
- }
- }
- Console.WriteLine($"{snow} : {time} = {highest} ({quality})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement