• + 0 comments

    Strange to see such a simple challenge following a few that are more complex. I'm used to challenges being increasingly more complex.

    import re, sys
    
    print('\n'.join(
      ['NO', 'YES']
      [re.match(r'^[789]\d{9}$', l) is not None]
      for l in sys.stdin.readlines()[1:]))