Exercise: Data Types and Variables - 11. *Snowballs
Здравейте,
дава ми 90/100 в Judge, може ли някой да каже какво липсва?:
using System;
namespace Snowballs
{
class Program
{
static void Main(string[] args)
{
int snowBallCount = int.Parse(Console.ReadLine());
double snowBallValue = 0;
double higestSnValue = 0;
uint bestSnSnow = 0;
uint bestSnTime = 0;
uint bestSnQual = 0;
for (int i = snowBallCount - 1; i >= 0; i--)
{
uint snowballSnow = uint.Parse(Console.ReadLine());
uint snowballTime = uint.Parse(Console.ReadLine());
uint snowballQuality = uint.Parse(Console.ReadLine());
if (snowballTime != 0)
{
snowBallValue = Math.Pow((double)(snowballSnow / snowballTime), (double)snowballQuality);
if (snowBallValue > higestSnValue)
{
higestSnValue = snowBallValue;
bestSnSnow = snowballSnow;
bestSnTime = snowballTime;
bestSnQual = snowballQuality;
}
}
}
Console.WriteLine($"{bestSnSnow} : {bestSnTime} = {higestSnValue:F0} ({bestSnQual})");
}
}
}
Благодаря предварително.