STATUS
reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
n=n //= 3
print ([n for n in range(301) if a(n)==0] ) # Indranil Ghosh, Jun 07 2017
approved
editing
print [n for n in xrangerange(301) if a(n)==0] # Indranil Ghosh, Jun 07 2017
proposed
approved
editing
proposed
(Python)
def a(n):
s=0
x=0
while n>0:
x=n%3
n=n/3
if x==2:
x=-1
n+=1
s+=x
return s
print [n for n in xrange(301) if a(n)==0] # Indranil Ghosh, Jun 07 2017
approved
editing
editing
approved