FBI
InterviewTime limit0.25sMemory limit128 MB
Given five agent codes, print the 1-based positions of those containing the substring FBI, or a fixed message if none do.
- Level
Easy1 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
You are given five agent codes. Write a program that finds the positions of the agents whose code contains the string FBI.
The positions are numbered from 1 to 5 in input order.
Input
Five lines are given. Each line contains one agent code.
Each code consists only of uppercase English letters, digits from 0 to 9, and hyphens (-), and its length is at most 10.
Output
Print the positions of all agents whose code contains the string FBI on one line.
If there is more than one such position, print them in increasing order separated by spaces. If no such agent exists, print HE GOT AWAY!.