1st is a Russian who solved 1978 problems,
3rd is a Japanese who solved 1790 problems,
21nd is a Taiwanese who solved 1278 problems,
1389th is me who solved 170 problems,
They are far far far away from me.......
這題並不會很難, 但是用到 pow() 函式的時候卻發現了有趣的問題.
情況一:
pow(10, 2) == 100 <= TRUE
pow(10, 3) == 1000 <= TRUE
pow(10, 4) == 10000 <= TRUE
情況二:
n = 2;
pow(10, n) == 100 <= TRUE
n = 3;
pow(10, n) == 1000 <= FALSE
n = 4;
pow(10, n) == 10000 <= TRUE
不知道為什麼會這樣哩 : P
去問問數值分析老師好了, 哈哈.
沒有留言:
張貼留言