float型float f=3.4是否正确? 不正确。精度不准确,应该用强制类型转换,如下所示:float f=(float)3.4 或float f = 3.4f 在java里面,没小数点的默认是int,有小数点的默认是double; int转成long系统自动作没有问题,因为后者精度更高 double转成float就不能自动做了,所以后面的加上个f 问答 2024-10-23 48 点赞 0 评论 72 浏览
数论刷题 Dima and Lisa CodeForces - 584DDima loves representing an odd number as the sum of multiple primes, and Lisa loves it when there are at most three primes. Help them to represent the given number as the 紫书算法学习记 2024-10-02 46 点赞 0 评论 69 浏览