Usernames
Statement
Goal
Storyline:You work for CodinGame and are asked to get rid of all fake accounts.
The Problem:
You must output all fake accounts in the given usernames.
Criteria of fake accounts(can have any one of these):
- An anonymous with random case
- Forbidden character like space, colon, etc.(only alphabets, numbers and underscores allowed)
- More than one underscore
Note: If there are no fake accounts you must output 'Cleared'
Input
num: (integer)
username: (string)
username: (string)
Output
'Cleared'(case matters) or a list of all fake accounts separated by space (ex. Anonymous ANONYMOUS ___)
Constraints
0 < num < 51
0 < len(username) < 16
0 < len(username) < 16
Example
Input
5 Mr.Anonymous i_am_not_ANONYMOUS anonymous IamNOTanon aNoNyMoUs_cow
Output
Mr.Anonymous i_am_not_ANONYMOUS anonymous aNoNyMoUs_cow
Game modes
Fastest, Shortest
Test cases
Anonymous Test
Input
5
Mr.Anonymous
i_am_not_ANONYMOUS
anonymous
IamNOTanon
aNoNyMoUs_cow
Output
Mr.Anonymous i_am_not_ANONYMOUS anonymous aNoNyMoUs_cow
Anonymous validator Validator
Input
8
anonymous882
aNONymouse
Canonymouse
Please_dontDeleteME
IllKILLyou,ifyouthinkIamanonymous
Iamnotafake
AANONANONYMOUS
IamInnocent
Output
anonymous882 aNONymouse Canonymouse IllKILLyou,ifyouthinkIamanonymous AANONANONYMOUS
Forbidden characters Test
Input
5
LikeIsaid,Iamnotfake
string[1:0]
Dont make me sad :(
Original Iam
amIinnocent_muahahahaaha
Output
LikeIsaid,Iamnotfake string[1:0] Dont make me sad :( Original Iam
Forbidden characters Validator Validator
Input
8
1.0 = 0
xD_YouWillNEVERcatchME
Mr.Hallelujah
Hello world, I am new here!
IamINEVITABLE,andIamIRONMAN
President of us. coding :)
IamYour[BIG-BOSS]
INSURANCEisKEY
Output
1.0 = 0 Mr.Hallelujah Hello world, I am new here! IamINEVITABLE,andIamIRONMAN President of us. coding :) IamYour[BIG-BOSS]
Extra underscores Test
Input
5
i_am_mother
Guilty_as_charged
UknowMEtoowell_dont_you
JokerBEATSbatman_soTRUE
ASusual_IamINNOCENT
Output
i_am_mother Guilty_as_charged UknowMEtoowell_dont_you
Extra underscores Validator Validator
Input
8
TOO_many_UNDERSCORES
iAMnotYOURbig_bossSORRY
LOUIS_ARMSTRONG
iAM_note_a_noob
UNSTOPPABLEforceMEETSimmovableOBJECT
J.K._Rowling_Sucks
Just_KiddingROWLINGxD
WhyAMilikethis
Output
TOO_many_UNDERSCORES iAM_note_a_noob J.K._Rowling_Sucks
Cleared Test
Input
5
Player
eulerscheZahl
dbdr
reCURSE
jolindien
Output
Cleared
Cleared Validator Validator
Input
8
The_ZimaBlue
EnderWiggins
Alex_1
jrke
cegprakash
Crazygamer
Unnames_CodinGamer
letsCLEAREDitSHALLwe
Output
Cleared
Solution language
Solution
Stub generator input