|  | 
|  | 
| вернуться в форум | How to solve it? Python 3. Where mistake? My code:
 n = int(input())
 q = 11
 constq = 11
 sum = 1
 counter = 0
 
 for i in range(1,10):
 if (n % i == 0):
 counter += 1
 
 while True:
 if (n != 0) and (counter > 2):
 while q > 0:
 sum *= q % 10
 q //= 10
 if sum == n:
 print(constq)
 break
 else:
 print(-1)
 break
 constq += 1
 q = constq
 sum = 1
 | 
 | 
|