CS
cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
String name = Console.ReadLine();
int agents = Convert.ToInt32(Console.ReadLine());
String others = Console.ReadLine();
/* replace the whole thing
int endString1 = others.IndexOf(' ', 0);
int endString2 = others.IndexOf(' ', endString1 + 1);
int endString3 = others.IndexOf(' ', endString2 + 1);
String name1 = others.Remove(endString1);
String name2 = others.Substring(endString1 + 1, endString2 - 1);
String name3 = others.Substring(endString2 + 1, endString3 -1);
String name4 = others.Remove(0, endString3);
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run