- An example that I use for experimentation, esp. re: concurrency.
- Given that
10! = 7! x 6!, find other integers,a,b,csuch that:a! = b! x c!- Note there are trivial cases, which are not interesting but good sanity checks:
- if
a = c!, thena! = (a-1)! x c! - e.g.
24! = 23! x 4!
- if
- I typically avoid using
BigIntor other assists.- That said, the data structures and algorithms are faily simplistic.
- usage:
./run.sh - tested with Java 21, Gradle wrapper 8.7
Workerobjects process ranges of (a,b,c)Calculatorcomputes/caches factorialsReporterlogs hits