Skip to content

java: add solutions for year 2016, day 15 #106

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

Merged
merged 3 commits into from
Jan 9, 2020
Merged

java: add solutions for year 2016, day 15 #106

merged 3 commits into from
Jan 9, 2020

Conversation

saser
Copy link
Owner

@saser saser commented Jan 9, 2020

What a happy coincidence that I just happened to recently work with the Chinese Remainder Theorem, and that I realized that this problem is simply an instance of the problem that CRT solves. As there are known algorithms for CRT, this solution runs really fast: about 8 microseconds for both parts (on a warmed-up JVM).

@saser saser merged commit 6ca78f9 into master Jan 9, 2020
@saser saser deleted the java/2016/15 branch January 9, 2020 01:15
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

Successfully merging this pull request may close these issues.

1 participant