Tag: number theory
In , the euclidean algorithms i.e. gcd and lcm are presented. Especially the gcd function, which computes the greatest common divisor, is fundamentally important in math and can be …
July 16, 2012
algorithms, batch script, beginner, brute force, implementation, math, programming languages, technical, tricks, windows, windows command shell
Windows Batch File (*.bat, *.cmd) is probably the most well-known exectuable file formats because of its simplicity, i.e. each line corresponds to a command for shell to execute. This …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/26/A The input range is small which means even the worst brute-force methods can pass the test. The straightforward implementation is . Defining a …
A prime number is a positive natural number that is greater than 1 and no other divisors other than 1 and itself. For example, 2, 3, 5 are primes …
The problem is from codeforces: http://codeforces.com/problemset/problem/197/B It has been a while since last time I submitted Python solutions to codeforces. This time, I pick a math problem that can …