-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KUB another solution #13
Comments
@fagci, спасибо за предложение решения, но оно не проходит тест :) Причины, думаю 2:
|
Ещё пару раз запустить без пробелов вокруг for num in range(100, 1000):
kub = set(str(num))
if len(kub) == 3 and sum(map(int, kub))**3 == num:
print(f'({"+".join(str(num))})^3={num}') Ваш код конечно понятнее и быстрее, но есть 2 момента:
// кстати, на https://www.codewars.com/ есть система оценки вариантов решений. Можно увидеть самое "крутое" по оценкам. |
@fagci, спасибо за замечания, подправил :)
Ведь цифры в K, U, B должны быть разные, поэтому начинаться с 100 и заканчиваться на 999 точно не может :D |
Предложенный алгоритм добавил в (K+U+B)^3=KUB v2.py |
SimplePyScripts/(K+U+B)^3=KUB.py
Line 16 in 154b0f8
The text was updated successfully, but these errors were encountered: