Consider the input [email protected] Here the first part is 'abc'. This is less than 5 characters in length, so replace all characters in the first part with * Hence, the output is: ***@gmail.com
Example 1
Consider the input
[email protected]
Here the first part is 'abc'. This is less than 5
characters in length, so replace all characters in the
first part with *
Hence, the output is:
***@gmail.com
Example 2
Consider the input:
[email protected]
Here the first part is 'abcdefghi'. This is more than 5
characters in length, so replace all characters in the
first part, except the first 3 with *
Hence, the output is:
abctt****
******@gmail.com
Function Description
Complete the function obfuscate Mailld in the
editor below. The function must print the
obfuscated mail id as per the rules mentioned. If
the mail id is invalid, it should print Invalid input
obfuscate Mailld has the following parameter(s):
mailld: a string representing the mail id
Constraints
• A valid mail id should contain the character @ (e.g.