Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp
- {
- class Program
- {
- static void Main(string[] args)
- {
- char lastSector = char.Parse(Console.ReadLine());
- int rowsCount = int.Parse(Console.ReadLine());
- int oddRowCount = int.Parse(Console.ReadLine());
- int totalPlaces = 0;
- for (char i1 = 'A'; i1 <= lastSector; i1++, rowsCount++)
- {
- for (int i2 = 1; i2 <= rowsCount; i2++)
- {
- int places = i2 % 2 == 1 ? oddRowCount : oddRowCount * 2;
- for (char i3 = 'a'; i3 < 'a'+places; i3++)
- {
- Console.WriteLine($"{i1}{i2}{i3}");
- totalPlaces++;
- }
- }
- }
- Console.WriteLine(totalPlaces);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment