Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Oscars
- {
- class Program
- {
- static void Main(string[] args)
- {
- string name = Console.ReadLine();
- double academyPoints = double.Parse(Console.ReadLine());
- int countExamers = int.Parse(Console.ReadLine());
- double sumPoint = academyPoints;
- for (int iterator = 0; iterator < countExamers; iterator++)
- {
- string nameEvaluate = Console.ReadLine();
- double pointsEvaluate = double.Parse(Console.ReadLine());
- int txt = nameEvaluate.Length;
- sumPoint += (txt * pointsEvaluate) / 2;
- if (sumPoint > 1250.5)
- {
- break;
- }
- }
- if (sumPoint > 1250.5)
- {
- Console.WriteLine($"Congratulations, {name} got a nominee for leading role with {sumPoint:F1}!");
- }
- else
- {
- Console.WriteLine($"Sorry, {name} you need {(1250.5-sumPoint):F1} more!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement