#C6804. Replace 'not' with 'definitely'
Replace 'not' with 'definitely'
Replace 'not' with 'definitely'
You are given a string s
. Your task is to replace every occurrence of the substring not
with definitely
in s
.
For example, if s = "This is not a drill"
, then the output should be This is definitely a drill
. Note that the replacement is done regardless of word boundaries; even if not
appears consecutively, every occurrence should be replaced.
Examples:
- Input:
This is not a drill
→ Output:This is definitely a drill
- Input:
notnotnot
→ Output:definitelydefinitelydefinitely
You can assume that the input string contains only ASCII characters.
inputFormat
The input consists of a single line containing a string s. The string may include spaces and punctuation.
For example:
This is not a drill
outputFormat
Output the modified string after replacing every occurrence of not
with definitely
.
This is not a drill
This is definitely a drill