Part1: 一元二次方程求解 #include <math.h>#include <stdio.h>#include <stdlib.h>int main() {float a, b, c, x1, x2;float delta, real, imag;printf("Enter a, b, c: ...
分类:
其他好文 时间:
2019-11-18 12:50:44
阅读次数:
50
part 1: 一元二次方程求解 #include <math.h>#include <stdio.h>#include <stdlib.h>int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b ...
分类:
其他好文 时间:
2019-11-17 01:22:37
阅读次数:
60
// 一元二次方程求解 // 重复执行, 直到按Ctrl+D或Ctrl+E结束 // #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a, b, c, x1, x2; float delta, r ...
分类:
其他好文 时间:
2019-11-16 17:30:37
阅读次数:
66
A题: 方法一:一元二次方程求解,但是会有精度误差,+1个点特判一下。 #include <bits/stdc++.h> using namespace std; typedef unsigned long long ll; ll t; ll x,y,z; int main() { //freope ...
分类:
其他好文 时间:
2017-11-18 16:02:26
阅读次数:
141
importmath
defmy_abs(x):
ifx>0:
returnx
else:
return-x
print(my_abs(-6))
#ax^2+bx+c=0
defquadratic(a,b,c,):
t=b*b-4*a*c
ifa==0&b!=0:
x=-(b/c)
returnx
elifa!=0:
ift>0:
x1=(-b+math.sqrt(t))/(2*a)
x2=(-b-math.sqrt(t))/(2*a)
retur..
分类:
编程语言 时间:
2017-02-13 15:43:37
阅读次数:
246
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.or ...
分类:
其他好文 时间:
2016-08-27 15:35:51
阅读次数:
132
-----------------------------------------------------------------------------------------------------------------------------
typedef double Number
int CesiumMath::sign(Number value){
...
分类:
编程语言 时间:
2014-11-21 12:43:17
阅读次数:
249
题目地址:HDU 4937
多校的题以后得重视起来。。。每道题都错好多次。。。很考察细节。比如这道。。。。WA了无数次。。。。
这题的思路自己真心想不到。。。这题是将进制后的数分别是1位,2位,3位和更多位的分开来计算。
当是1位的时候,显然只有3到6,此时只能是-1
当是2位的时候,可以转换成一元一次方程求解
当是3位的时候,可以转换成一元二次方程求解
当是4位的时候,此时最多也只有...
分类:
其他好文 时间:
2014-08-14 23:53:36
阅读次数:
263