Untitled
unknown
plain_text
2 years ago
633 B
11
Indexable
string name = Console.ReadLine();
double academyPoints = double.Parse(Console.ReadLine());
int jurys = int.Parse(Console.ReadLine());
double totalPoints = 0;
for (int i = 0; i <= jurys; i++)
{
string juryName = Console.ReadLine();
double juryPoints = double.Parse(Console.ReadLine());
double lenght = juryName.Length;
totalPoints += academyPoints + (juryPoints * lenght / 2);
}
if (totalPoints > 1250.5)
Console.WriteLine($"Congratulations, {name} got a nominee for leading role with {totalPoints}!");
else
Console.WriteLine($"Sorry, {name} you need {1250.5 - totalPoints} more!");Editor is loading...
Leave a Comment