Tag: number theory
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 …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/192/A The given input to this problem can be held by a four-byte integer (32-bit). It is to search for two numbers and such …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/173/A This is the first problem that I submited in codeforces. It is a math problem that computes how many games for two players …
May 20, 2012
algorithms, beginner, code, codeforces, data structure, implementation, programming languages, python, string, technical
The problem is from codeforces: http://www.codeforces.com/problemset/problem/158/C Using a stack will help solve this problem. Luckly, python supports stack structure by using list. The append() and pop() are used to …