[ABC315G] Ai + Bj + Ck = X (1 <= i, j, k <= N)
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.
[ABC315G] Ai + Bj + Ck = X (1 <= i, j, k <= N)
题面翻译
给定 ,求满足 且 的三元组 的个数。,,。
题目描述
You are given integers . Find the number of triples of integers that satisfy all of the following conditions.
输入格式
输入格式如下:
输出格式
输出一个非负整数表示答案。
样例 #1
样例输入 #1
5 3 1 5 15
样例输出 #1
3
样例 #2
样例输入 #2
1 1 1 1 1
样例输出 #2
0
样例 #3
样例输入 #3
100000 31415 92653 58979 1000000000
样例输出 #3
2896
提示
数据范围
- 输入都是正整数
样例解释1
满足条件的正整数有以下3组。- : $ 3\ \times\ 1\ +\ 1\ \times\ 2\ +\ 5\ \times\ 2\ =\ 15 $ - : $ 3\ \times\ 2\ +\ 1\ \times\ 4\ +\ 5\ \times\ 1\ =\ 15 $ - : $ 3\ \times\ 3\ +\ 1\ \times\ 1\ +\ 5\ \times\ 1\ =\ 15 $
9月19日周二晚上集训赛
- Status
- Done
- Rule
- IOI
- Problem
- 8
- Start at
- 2023-9-19 19:00
- End at
- 2023-9-19 21:00
- Duration
- 2 hour(s)
- Host
- Partic.
- 30