fork(3) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.IO;
  6. using System.Globalization;
  7.  
  8.  
  9. namespace spoj1
  10. {
  11. class Program
  12. {
  13. static void Main(string[] args)
  14. {
  15. string y;
  16. while (((y = Console.ReadLine())) != null)
  17. {
  18. TextInfo ti = CultureInfo.CurrentCulture.TextInfo;
  19. int i = 0;
  20. int j = 0;
  21. var s = new List<string>();
  22. int indeks =0;
  23. while (indeks<y.Length )
  24. {
  25. string temp = y.Split(' ')[i];
  26. indeks = indeks+ temp.Length+1;
  27. if (j == 0 &&temp!="") s.Add(temp);
  28. else if (temp !="") s.Add(ti.ToTitleCase(temp));
  29. if (temp != "") j++;
  30. i++;
  31. }
  32. Console.WriteLine(string.Concat(s));
  33. }
  34.  
  35. }
  36. }
  37. }
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
Success #stdin #stdout 0.04s 23952KB
stdin
dupa dupa
   asd asafa
ssss             ssss
    
stdout
dupaDupa
asdAsafa
ssssSsss