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 points = double.Parse(Console.ReadLine());
- int juryNum = int.Parse(Console.ReadLine());
- for (int i = 0; i < juryNum; i++)
- {
- string juryName = Console.ReadLine();
- double currentPoint = double.Parse(Console.ReadLine());
- points += juryName.Length * currentPoint / 2;
- if (points > 1250.5)
- {
- break;
- }
- }
- if (points > 1250.5)
- {
- Console.WriteLine($"Congratulations, {name} got a nominee for leading role with {points:f1}!");
- }
- else
- {
- Console.WriteLine($"Sorry, {name} you need {1250.5 - points:f1} more!");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment