Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace TennisRanklist
- {
- class Program
- {
- static void Main(string[] args)
- {
- int tourney = int.Parse(Console.ReadLine());
- int points = int.Parse(Console.ReadLine());
- int win = 0;
- int total = 0;
- for (int i = 0; i < tourney; i++)
- {
- string stage = Console.ReadLine();
- switch (stage)
- {
- case "W":
- total += 2000;
- win++;
- break;
- case "F":
- total += 1200;
- break;
- case "SF":
- total += 720;
- break;
- }
- }
- Console.WriteLine($"Final points: {total + points}");
- Console.WriteLine($"Average points: {Math.Floor((double)total/tourney)}");
- Console.WriteLine($"{(double)win/tourney * 100:F2}%");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement