D. 方程的解

    Type: Default 1000ms 256MiB

方程的解

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

现有两个数字 aabb , 若 a+b2=na+b^2=na2+b=ma^2+b=m,请你找到所有可能的 a,ba,b 方案数。


输入格式

一行共两个数,分别代表题意中的 nnmm


输出格式

共一行,表示所有可能的 aabb 方案数


输入样例

20 20

输出样例

1

数据范围

0n,m10000≤n,m≤1000

a,b0a,b≥0

1.18竞赛B班

Not Attended
Status
Done
Rule
IOI
Problem
5
Start at
2025-1-18 13:45
End at
2025-1-18 15:45
Duration
2 hour(s)
Host
Partic.
8