当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1496:Equations

题目描述
Consider equations having the following form:

a*x1^2+b*x2^2+c*x3^2+d*x4^2=0
a, b, c, d are integers from the interval [-50,50] and any of them cannot be 0.

It is consider a solution a system ( x1,x2,x3,x4 ) that verifies the equation, xi is an integer from [-100,100] and xi != 0, any i ∈{1,2,3,4}.

Determine how many solutions satisfy the given equation.
输入解释
The input consists of several test cases. Each test case consists of a single line containing the 4 coefficients a, b, c, d, separated by one or more blanks.
End of file.
输出解释
For each test case, output a single line containing the number of the solutions.
输入样例
1 2 3 -4
1 1 1 1
输出样例
39088
0
来自杭电HDUOJ的附加信息
Author LL
Recommend LL

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-1496

最后修改于 2020-10-25T22:45:29+00:00 由爬虫自动更新

共提交 138

通过率 88.41%
时间上限 内存上限
6000/3000MS(Java/Others) 32768/32768K(Java/Others)