for(i<-1 to 1995 if{var s=i;while(s>6)s=s+""map(x=>x%16*(x-48))sum;s<2})println(i)