Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int result = 0;
- for (int i = 0; i < n; i++)
- {
- int numCables = int.Parse(Console.ReadLine());
- string cabType = Console.ReadLine();
- if (cabType == "meters")
- {
- numCables *= 100;
- }
- if (numCables >= 20)
- {
- result += numCables - 2;
- }
- }
- int counter = 0;
- int leftResult = result;
- for (int i = result; i > 504; i -= 504)
- {
- counter++;
- leftResult -= 504;
- }
- Console.WriteLine(counter);
- Console.WriteLine(leftResult);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement