把这个题show给儿子看,被他忽悠了一把。
1. 这个题的关键是solve。 在他看来,只要make effort去solve, 不管答案对不对,至少该给一大半earnest credit.
2. 题中没说不能找hint。 Google is the quickest way to get hints.
3. 题中没说不能用computer。 码工应该扬长避短,不要跟人死磕数学,不就几个for loop吗?
被他“教育”了一把,只好老老实实敲了个小程序。
小孩子有时看问题的角度蛮有意思的。