Untitled

mail@pastecode.io avatar
unknown
plain_text
19 days ago
633 B
5
Indexable
Never
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!");
Leave a Comment