We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
# Enter your code here. Read input from STDIN. Print output to STDOUTinputcases=[]T=int(input())forcasesTinrange(0,T):inputcases.append(input())forAininputcases:if(A.isalnum()):total_count=0upper_count=0digit_count=0rep_char=FalseforcharinA:rep_char_nos=0ifnotrep_char:forlettersinA:if(letters==char):rep_char_nos+=1ifrep_char_nos>1:rep_char=Truebreaktotal_count+=1if(char.isupper()):upper_count+=1elif(char.isdigit()):digit_count+=1if(upper_count>1anddigit_count>2andtotal_count==10andnotrep_char):print('Valid')else:print('Invalid')else:print('Invalid')
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Validating UID
You are viewing a single comment's thread. Return to all comments →