Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Dragons_Hatching
- {
- class Program
- {
- static void Main(string[] args)
- {
- int teams = int.Parse(Console.ReadLine());
- double dragonsHatchingValue = double.Parse(Console.ReadLine());
- double sum = 0;
- for (int i = 0; i < teams; i++)
- {
- string[] input = Console.ReadLine().Split(' ');
- long dragonsHatched = long.Parse(input[0]);
- long teamMembersCount = long.Parse(input[1]);
- double teamPoints = (double)dragonsHatched / teamMembersCount;
- sum += teamPoints;
- }
- double result = sum / dragonsHatchingValue;
- Console.WriteLine($"{result:f3}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment