Skip to content
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

Nice #2

Open
lzy960601 opened this issue Jun 3, 2021 · 5 comments
Open

Nice #2

lzy960601 opened this issue Jun 3, 2021 · 5 comments

Comments

@lzy960601
Copy link

lzy960601 commented Jun 3, 2021

Nice

@lzy960601 lzy960601 changed the title 2016 Round E, Beautiful Numbers Nice Jun 3, 2021
@XilaiZhang
Copy link
Owner

For question 2 beautiful numbers, I wrote a short proof of why our objective function is monotonically increasing
Screen Shot 2021-06-04 at 12 08 40 AM

@XilaiZhang XilaiZhang reopened this Jun 3, 2021
@XilaiZhang
Copy link
Owner

forgot to mention, the above is about 2016 round E question 2 beautiful numbers.

@lzy960601
Copy link
Author

lzy960601 commented Jun 4, 2021

Sorry, but I think your code returns the wrong answer on input N = 269 and N = 585.
My solution is, N = 1 + B + B^2 + ..., so B must be a factor of N - 1, and we can enumerate all of the factors of N - 1 to find the best one.
@XilaiZhang

@XilaiZhang
Copy link
Owner

based on runs from yesterday and today the answers seem to be correct:
Screen Shot 2021-06-04 at 12 39 37 PM
Here are runs on google kickstart environment:
Screen Shot 2021-06-04 at 12 46 34 PM
And i think you are trying to verify result for 259 instead of 269?

@lzy960601
Copy link
Author

Ah, sorry for that, I ran your code in a wrong way. Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants