摘要: 1.海伦公式: a、b、c为三角形三条边的长度,p是三角形周长一半 2.叉积求面积:叉积=三角形面积=叉积/2 #include<iostream> #include<stdio.h> #include<math.h> using namespace std; struct node { int x 阅读全文
posted @ 2018-08-13 12:03 守林鸟 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 运用1:求小于或等于n并且和n互质的数的个数,记作φ(n) 通式:φ(x) = x(1-1/p1)(1-1/p2)(1-1/p3)...(1-1/pn) 其中p1,p2,p3...pn为x的质因数,每种质因数只有一个。 如12=2*2*3,φ(12)=12*(1-1/2)*(1-1/3)=4 (1, 阅读全文
posted @ 2018-08-13 10:00 守林鸟 阅读(242) 评论(0) 推荐(0) 编辑