fork download
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.  
  5. public static void main(String[] args) {
  6. try {
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9. while (scanner.hasNextLine()) {
  10. String inputText = scanner.nextLine();
  11. char[] html_code = inputText.toCharArray();
  12. int i = 0;
  13. while (html_code[i] != '\0') {
  14. while (i < html_code.length) {
  15. if (html_code[i] == '<') {
  16. ++i;
  17.  
  18. while (html_code[i] != '>') {
  19. if (html_code[i] >= '0' && html_code[i] <= '9') {
  20. return;
  21. } else {
  22. html_code[i] = Character.toUpperCase(html_code[i]);
  23. ++i;
  24. }
  25. }
  26.  
  27. } else {
  28. ++i;
  29. }
  30. }
  31.  
  32. for (char c : html_code) {
  33. System.out.print(c);
  34. }
  35.  
  36.  
  37. }
  38. System.out.println();
  39. }
  40. } catch (Exception ignore) {
  41. }
  42. }
  43. }
Success #stdin #stdout 0.16s 35648KB
stdin
<html>
<head>
<TITLE>To jest tytul</Title>
</head>
<body>
<b>Cos tam</b>
</body>
</html>
stdout
<HTML>