Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lista=raw_input().split()
- p=int(lista[0])
- n=int(lista[1])
- i=0
- valores=[]
- while i<n:
- valores.append(int(input()))
- i+=1
- valores.sort()
- res="S"
- num_testar=1
- i=1
- num_posicao=1
- while i<=n:
- if num_testar not in valores:
- res="N"
- break
- del valores[valores.index(num_testar)]
- #print valores
- if num_posicao==p:
- num_posicao=0
- num_testar=0
- num_testar+=1
- i+=1
- num_posicao+=1
- print res
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement