Tag: math
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 …
The Iterator is an interface for external iterators or objects that can be iterated themselves internally. In PHP, it is defined as follows. Iterator extends Traversable { /* Methods …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/214/A Simple as that, the brute-force can pass the tests. The given ranges for n and m are acceptable for the simple brute-force algorithm. …