In Python 2.x, the function range(x, y, s) generates a actual list of elements from x to y – 1 step s. The other syntax is range(a) and range(a, b) which is the same as range(0, a, 1) and range(a, b, 1) respectively. For example, …
The problem is from codeforces: http://codeforces.com/problemset/problem/347/B It has been a while and I just pick another easy math problem to update the blog. The problem states that only maximum 1 …
The Halting Problem is one of the most classic and well-known problem in computational theory. It can be stated as “Given the description of any computer programs, decide whether …
The problem is from codeforces: http://codeforces.com/problemset/problem/298/B The note given in the problem description pretty much explains the problem clearly. In every moment, the ship can choose to stay put or …
It looks like it has been a while since last time I submitted code to codeforces. I almost forgot the fun of solving problems. Again, I choose solving easy …