Tag: math
The problem is from codeforces: http://www.codeforces.com/problemset/problem/137/B It took me several attempts to get it right for this problem although it is not difficult. The problem is find out how …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/4/A The problem is so easy that you might even falls into the trap (you might think judging if it is even or odd). …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/102/B The input can be very large, you might wonder to use long arithmetic via arrays. However, it might be easier than you think. …
Computing PI can be dated back long long time ago, where without the help of computer, mathematicans can only compute several digts i.e. 15 in months. Later, in 20 …
The method of Monte Carlo (MC) relies on repeated random sampling. It is often used in computing simulations. For example, to compute the PI value, one can generate as many …