Skip to content

Minimization of while loop in Armstrong Numbers #9968

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

Closed
lohith-lalam opened this issue Oct 7, 2023 · 4 comments · Fixed by #9976
Closed

Minimization of while loop in Armstrong Numbers #9968

lohith-lalam opened this issue Oct 7, 2023 · 4 comments · Fixed by #9976
Labels
enhancement This PR modified some existing files

Comments

@lohith-lalam
Copy link

Feature description

We can use math.log() to find the number of digits in a number instead of while loop.

c = log(n) + 1

@lohith-lalam lohith-lalam added the enhancement This PR modified some existing files label Oct 7, 2023
@Dwarkadhish2005
Copy link
Contributor

My change in this code has fixed the problem you were facing, it has minimized loops and in simple way

@ambiguousphoton
Copy link

Please check the pull request -> #10127

@himanchal08
Copy link

i would like to work on this issue it seems doable
i will try my best to implement it

@cclauss
Copy link
Member

cclauss commented Oct 15, 2023

CONTRIBUTING.md says:

Do not create an issue to contribute an algorithm. Please submit a pull request instead.

@cclauss cclauss closed this as completed Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This PR modified some existing files
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants