Tag: number theory
September 14, 2012
algorithms, batch script, beginner, brute force, github, implementation, programming languages, recursive, tools / utilities, tricks
I have used a lot the Fibonacci numbers as an example to illustrate the programming concepts and ideas. Today, I still use this to revisit the concepts of programming …
The problem is from codeforces http://codeforces.com/problemset/problem/221/B The problem statement is clear. The answer is to count the number of divisors that has at least one common digit with the …
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 …