fork(3) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp9
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int s = 0;
  14. while (s < 10000)
  15. {
  16. string input = Console.ReadLine();
  17. if (input == null || input == "") break;
  18. string[] html = input?.Split('<', '>');
  19. //Console.WriteLine(html[2]);
  20.  
  21.  
  22. string result = string.Empty;
  23. int i = 0;
  24. foreach (string word in html)
  25. {
  26. if (!String.IsNullOrWhiteSpace(word))
  27. {
  28. if (i % 2 != 0)
  29. {
  30. result += '<';
  31. result += word.ToUpper();
  32. result += '>';
  33. }
  34. else
  35. {
  36. result += word;
  37. }
  38. }
  39. i++;
  40. }
  41.  
  42. Console.WriteLine(result?.ToString());
  43. s++;
  44. }
  45.  
  46. }
  47.  
  48.  
  49.  
  50.  
  51. }
  52. }
  53.  
Success #stdin #stdout 0.01s 131520KB
stdin
<html>
<head>
<TITLE>To jest tytul</Title>
</head>
<body>
<b>Cos tam</b>
</body>
</html>
stdout
<HTML>
<HEAD>
<TITLE>To jest tytul</TITLE>
</HEAD>
<BODY>
<B>Cos tam</B>
</BODY>
</HTML>