Tag: number theory
Base62, like Base10 (decimal), Base16 (hexadecimal), is a number system. Base62 uses 62 possible ASCII letters, 0 – 9, a – z and A – Z, therefore it is often …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/260/A This problem looks difficult at the first glance because of the input ranges are large for the given three integers. Using bruteforce to print …
Fermat Prime Test Algorithm is to check whether a number is prime. It is a probabilistic approach that based on the following observation. . This is also known as …
In , the GCD (Greatest Common Divisor) is given in brief details. The algorithm can be implemented in both recursive and iterative forms. The recursive formula is , and …
In , two equations are used and compare the efficiency of computation of the math constant . The following are some commonly-used equations to compute the We pick the …