三数之和
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.
Description
给你两个整数 和 ,
请问 有多少个三元组 满足 且
Format
Input
第一行输入两个整数 和
Output
输出一个整数表示答案
Samples
样例输入 1
2 2
样例输出 1
6
样例解释 1
6个三元组分别为:
X = 0, Y = 0, Z = 2
X = 0, Y = 2, Z = 0
X = 2, Y = 0, Z = 0
X = 0, Y = 1, Z = 1
X = 1, Y = 0, Z = 1
X = 1, Y = 1, Z = 0
样例输入 2
5 15
样例输出 2
1
Limitation
的数据满足
的数据满足
20241128周赛
- Status
- Done
- Rule
- IOI
- Problem
- 6
- Start at
- 2024-11-28 16:30
- End at
- 2024-11-28 18:30
- Duration
- 2 hour(s)
- Host
- Partic.
- 25