First and last appearance
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given a string of letters. If the letter f appears only once, print its index (indexes are numbered starting from 0).
If the letter f appears two or more times, print the index of the first and of the last appearance.
If letter f is not found in the given string, print nothing.
Input
One string of no more than 255 letters.
Output
Print the answer depending on how many times the letter f appears in the given string.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 5K
Acceptance rate 41%