res,hui,hui2=0,0,0
tmp=int(input())
while res!=0:
f=tmp//10000
y=f+1
date=y//1000+(y//100)%10+(y//10)%10+y%10+y*10000
if check(date)==true:
hui=date
if y//1000==(y//10)%10 and (y//100)%10==y%10 and check(date)==true:
hui2=date
res+=1
怎么才能得到我想得到的hui和hui2在while外部