|
|
вернуться в форумWrong answer 5 Послано Boar 15 окт 2022 20:30 What is the mistake? n = int(input()) a = [] for i in range(1, n+1): if n % i == 0: a.append(i) if n == 1: print("1") exit(0) if n == 0: print("10") exit() if len(a) > 2: for i in range(len(a) - 1): if a[i] * a[i + 1] == n or a[i]*a[i] == n: if a[i] * a[i + 1] == n: s = "".join(sorted(str(a[i])+str(a[i+1]))) print(s) else: print(a[i], a[i], sep="") else: print("-1") |
|
|