Tag: python
The problem is from codeforces: http://www.codeforces.com/problemset/problem/75/A The input two numbers can be held by 32-bit signed integer. Therefore, it is unnecessary to use arrays to represent numbers as strings. …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/151/A Based on the Note, it is purely a math problem (the equations can be easily derived.) The Python solution can be easily obtained. …
I guess, quite often, you see the usage of __name__ in Python. Yes, it is a keyword (attribute) associate to a module. It can be used to tell if …
Bogosort is a purely random sorting algorithm. It is inefficient because it is probablistic in nature. The algorithm is simple. Randoming shuffling the array until they are in order. …
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 …