102141: [AtCoder]ABC214 B - How many?

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $200$ points

Problem Statement

How many triples of non-negative integers $(a, b, c)$ satisfy $a+b+c \leq S$ and $a \times b \times c \leq T$?

Constraints

  • $0 \leq S \leq 100$
  • $0 \leq T \leq 10000$
  • $S$ and $T$ are integers.

Input

Input is given from Standard Input in the following format:

$S$ $T$

Output

Print the number of triples of non-negative integers $(a,b,c)$ satisfying the conditions.


Sample Input 1

1 0

Sample Output 1

4

The triples $(a,b,c)$ satisfying the conditions are $(0,0,0)$, $(0,0,1)$, $(0,1,0)$, and $(1,0,0)$ ― there are four of them.


Sample Input 2

2 5

Sample Output 2

10

Sample Input 3

10 10

Sample Output 3

213

Sample Input 4

30 100

Sample Output 4

2471

Input

题意翻译

输入两个非负整数 $s,t$ ,请编程输出满足 $a+b+c≤s$ 以及 $a×b×c≤t$ 的由非负整数构成的三元组 $(a,b,c)$ 的数量。

Output

分数:200分

问题描述

有多少个非负整数的三元组 $(a, b, c)$ 满足 $a+b+c \leq S$ 和 $a \times b \times c \leq T$?

限制条件

  • $0 \leq S \leq 100$
  • $0 \leq T \leq 10000$
  • $S$ 和 $T$ 是整数。

输入

输入从标准输入以以下格式给出:

$S$ $T$

输出

输出满足条件的非负整数三元组 $(a,b,c)$ 的数量。


样例输入1

1 0

样例输出1

4

满足条件的三元组 $(a,b,c)$ 有 $(0,0,0)$, $(0,0,1)$, $(0,1,0)$ 和 $(1,0,0)$,共有四个。


样例输入2

2 5

样例输出2

10

样例输入3

10 10

样例输出3

213

样例输入4

30 100

样例输出4

2471

加入题单

算法标签: