fork download
  1. def chuthuong(s):
  2. for i in range(0,len(s)):
  3. if 'a'<=s[i] and s[i]<='z':
  4. return True
  5. return False
  6.  
  7. def chuhoa(s):
  8. for i in range(0,len(s)):
  9. if 'a'<=s[i] and s[i]<='z':
  10. return True
  11. return False
  12.  
  13. def so(s):
  14. for i in range(0,len(s)):
  15. if '0'<=s[i] and s[i]<='9':
  16. return True
  17. return False
  18.  
  19. def kitu(s):
  20. for i in range(0,len(s)):
  21. if s[i]=='$' or s[i]=='#' or s[i]=='@':
  22. return True
  23. return False
  24.  
  25. matkhau = input()
  26. st=""
  27. for i in range(0,len(matkhau)):
  28. if matkhau[i]!=',':
  29. st=st+matkhau[i]
  30. else:
  31. if (chuhoa(st) and chuthuong(st) and so(st) and kitu(st) and len(st)>=6 and len(st)<=12):
  32. print(st)
  33. st=""
  34. if (st!=""):
  35. if (chuhoa(st) and chuthuong(st) and so(st) and kitu(st) and len(st)>=6 and len(st)<=12):
  36. print(st)
Runtime error #stdin #stdout #stderr 0.01s 27712KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 25, in <module>
    matkhau = input()
EOFError: EOF when reading a line