300265: CF50E. Square Equation Roots
Memory Limit:256 MB
Time Limit:5 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Square Equation Roots
题意翻译
$\forall b\in[1,n],c\in[1,m]$ 求$x^2+2bx+c=0$ 的不重复的实根个数 $n,m\le5\times10^6$ 感谢@Kelin 提供的翻译题目描述
A schoolboy Petya studies square equations. The equations that are included in the school curriculum, usually look simple: $ x^{2}+2bx+c=0 $ where $ b $ , $ c $ are natural numbers.Petya noticed that some equations have two real roots, some of them have only one root and some equations don't have real roots at all. Moreover it turned out that several different square equations can have a common root. Petya is interested in how many different real roots have all the equations of the type described above for all the possible pairs of numbers $ b $ and $ c $ such that $ 1<=b<=n $ , $ 1<=c<=m $ . Help Petya find that number.输入输出格式
输入格式
The single line contains two integers $ n $ and $ m $ . ( $ 1<=n,m<=5000000 $ ).
输出格式
Print a single number which is the number of real roots of the described set of equations.
输入输出样例
输入样例 #1
3 3
输出样例 #1
12
输入样例 #2
1 2
输出样例 #2
1