#C13644. String Formatter

    ID: 43205 Type: Default 1000ms 256MiB

String Formatter

String Formatter

You are given a string. Your task is to format it according to the following rules:

  • If the string is empty, output Empty string provided.
  • If the string starts with an alphabetic character (a-z or A-Z), convert the entire string to uppercase.
  • If the string starts with a numeric character (0-9), add ### both before and after the string.
  • If the string starts with any other character, reverse the entire string.

For example:

  • hello becomes HELLO
  • 12345 becomes ###12345###
  • !@# becomes #@!
  • 1Hello becomes ###1Hello###
  • _Hello becomes olleH_
  • An empty input returns Empty string provided

Note: If any mathematical formulas are to be included, they must be written in LaTeX format (e.g., \(a^2 + b^2 = c^2\)).

inputFormat

The input consists of a single line read from standard input (stdin) representing the string to be formatted.

outputFormat

The output should be a single line written to standard output (stdout) containing the formatted string as per the specified conditions.

## sample
hello
HELLO