小问题
Ziyang Luo
随缘
展开
-
如何求最大质因数?
关于某群的入群要求:#include using namespace std; bool isPrime(long long a) { bool is = true; for (int i = 2; i*i <= a; i++) if (a%i == 0)is = false; return is; } int main() { cout << "Enter a number:";原创 2016-05-31 18:23:19 · 1008 阅读 · 0 评论 -
R4 欧氏空间Schmidt正交化方法
#include using namespace std; class Euclidean{ public: Euclidean(double x1 = 0, double x2 = 0, double x3 = 0, double x4 = 0) : x1(x1), x2(x2), x3(x3), x4(x4){} friend Euclidean operator-(Euclidea原创 2016-06-01 20:34:42 · 826 阅读 · 0 评论 -
文件的大小与内存空间
一个文件的大小就是其实际内容具有的字节数,,以Byte为衡量单位,只要内容不发生变化,就不会改变。 一个文件的所占空间是由每个磁盘的簇与文件大小决定的,对于每一个不同的磁盘,它会有不同的簇(分配单元\Allucation\Cluster),而具体计算所占空间的公式为 簇数=floor(文件大小/每个分配单元大小)+1 所占空间=簇数*每个分配单元大小 那么我们该如何知道每一原创 2016-07-07 23:00:01 · 1204 阅读 · 0 评论