Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Tricky_Strings_II
- {
- class Program
- {
- static void Main(string[] args)
- {
- string delimiter = Console.ReadLine();
- int n = int.Parse(Console.ReadLine());
- string concat = string.Empty;
- for (int i = 0; i < n; i++)
- {
- string input = Console.ReadLine();
- concat += input + delimiter;
- }
- if (concat.EndsWith(delimiter))
- {
- Console.WriteLine(concat.Remove(concat.Length - delimiter.Length));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement