AGPREFX - Agent prefix
You have been recruited by a top secret intelligence organization. Now, finally, your dream of becoming a secret agent has come true. This agency is so secret that no one even knows its name... and it must stay that way!
Your first task is to to eliminate the name of your agency from the text messages that agents of other agencies exchange. Unfortunately, not even you can know. To do this someone will tell you the name and where it is in the text. Your job is to replace that word with the word LUISS.
Good luck Agent Prefix!
Inputs
Input will come to you over three lines. The first will contain the name of the agency to be eliminated, the second the first index of the string in which to replace the word, the third the message
Outputs
The output should be the string in the third line with the word in the first line replaced with LUISS
Example
Input: agenzia 7 Questa agenzia domina il mondo Output: Questa LUISS domina il mondo
hide comments
pavansss91:
2020-03-19 09:39:36
If anyone is confused, the index given is a random index of the string which is part of the word that needs to be replaced. |
|
partha2717:
2019-07-07 18:12:34
i/O translated:-
|
|
hodobox:
2019-01-02 19:58:44
I agree - super basic task, only open to Py 2.7, statement is not even in English... not a good problem for classical set. |
|
nadstratosfer:
2018-03-19 17:48:35
Please move to Basics and open to other languages.
|
|
wisfaq:
2018-03-19 13:51:28
Google translate:
|
Added by: | Donatella Firmani |
Date: | 2018-03-18 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | PYTHON |