比如0.1不能被表示为二进制数,所以被四舍五入储存为双精度浮点数。
For example, 0.1 cannot be represented binary, and therefore is rounded when stored in a double. Let me show you using python.
为了计算有多少个四位数字,你可以简单地用4去除最初的那个十进制数。
In order to calculate how many fours digits there are, you could simply divide the initial decimal number by 4.
我们不想十进制数字少于四位数-不含前导零,2992是第一个正确答案。
We don't want decimal numbers with fewer than four digits - excluding leading zeroes - so that 2992 is the first correct answer.
应用推荐