Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Len = int(input())
- mas = map(int, input().split())
- mas = list(mas)
- def F(n):
- t=n
- s=""
- while(n>0):
- s +=str(n%8)
- n//=8
- if(int(s[2])%2==1 and t%2==0):
- return True
- else:
- return False
- mas2=[]
- for i in mas:
- if F(i):
- mas2.append(i)
- mas2.sort()
- print(len(mas2))
- for i in mas2:
- print(i,end=" ")
Advertisement
Add Comment
Please, Sign In to add comment