Sichuan University Programming Contest 2006 Preliminary

F: Scientific counting method