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