fork(2) download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. try
  9. {
  10. while (true)
  11. Console.WriteLine(Enumerable.Repeat(Console.ReadLine(), 1).Where(s => s.Length > 5).FirstOrDefault()?.Split(' ')[0]);
  12. }
  13. catch (NullReferenceException)
  14. {
  15. }
  16. }
  17. }
Success #stdin #stdout 0s 131520KB
stdin
1
12
1 2
1 2 3
1 2 3 4
12 3
12345
123456
1 2 3 4 5
12 34 56
123 456
1234 56
12345 6
123456 7
123456
123456 789
1234567
1234567 789
stdout



1


123456
1
12
123
1234
12345
123456
123456
123456
1234567
1234567