#C6034. LED Pattern Coordinates
LED Pattern Coordinates
LED Pattern Coordinates
You are given a string pattern that consists of letters, spaces, and asterisks. Each letter in the string represents a lit LED in a single-row grid, while spaces and asterisks are not lit. Your task is to determine the total number of LEDs that are lit and output the coordinates for each lit LED.
For the purposes of this problem, the grid has only one row. The column number corresponds to the 1-indexed position of the character within the input string. Formally, if S is the input string of length n, then for each position \(i\) (where \(1 \le i \le n\)) such that \(S[i]\) is an English letter (i.e. meets the condition $\texttt{isalpha}(S[i])$), report the coordinate \((1,i)\).
The expected output is the total count of lit LEDs on the first line, followed by each LED's coordinates (row and column) on separate lines.
inputFormat
The input consists of a single line containing the string pattern. The string may include uppercase and lowercase English letters, spaces, and asterisks.
outputFormat
The output should be printed to standard output. The first line must contain an integer representing the count of lit LEDs. Each subsequent line should contain two space-separated integers representing the row and column of a lit LED respectively. Note that the grid contains only one row (row number is always 1) and the column numbers correspond to the 1-indexed positions in the string.
## sampleHello*World
10
1 1
1 2
1 3
1 4
1 5
1 7
1 8
1 9
1 10
1 11
</p>