Download jar file or use maven. psjava requires Java 1.6 (or above)
<dependency>
<groupId>org.psjava</groupId>
<artifactId>psjava</artifactId>
<version>0.1.19</version>
</dependency>
// 20! = 2432902008176640000 int res = NumberOfTrailingZerosInFactorial.calc(20, IntegerNumberSystem.getInstance()); // must be 4
Copyright 2014 psjava team. View on GitHub