feat: solution correctly finds number but has complexity of O(10**n). Needs an algorithm for better results

This commit is contained in:
Sandro Zimmermann 2026-05-25 18:55:41 +02:00
parent 3f835172e6
commit 63897a7fe5

View File

@ -0,0 +1,9 @@
def doubly_not_less(n):
n_int = m = int(n)
m_condition = int("".join([str(x) for x in [int(x) for x in n][::-1]]))
while m_condition < n_int:
m += 1
m_condition = int("".join([x for x in str(m)][::-1]))
return str(m)