Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace exampreparationworldsnookerchampionship
- {
- class Program
- {
- static void Main(string[] args)
- {
- string nameOfActor = Console.ReadLine();
- double academyPoints = double.Parse(Console.ReadLine());
- int numberOfJudges = int.Parse(Console.ReadLine());
- for (int i = 1; i <= numberOfJudges; i++)
- {
- string nameOfJudge = Console.ReadLine();
- double pointsJudge = double.Parse(Console.ReadLine());
- double points = nameOfJudge.Length * pointsJudge / 2;
- academyPoints += points;
- if (academyPoints >= 1250.5)
- {
- Console.WriteLine($"Congratulations, {nameOfActor} got a nominee for leading role with {academyPoints:f1}!");
- break;
- }
- }
- if (academyPoints < 1250.5)
- {
- double difference = 1250.5 - academyPoints;
- Console.WriteLine($"Sorry, {nameOfActor} you need {difference:f1} more!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement