408626: GYM103241 A P=NP

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

Description

A. P=NPtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

PurpleCrayon has recently solved P=NP! He refused to share his proof (or his $$$1000000$$$ prize as part of the raffle prize pool) so we cannot use it as our Very Easy 1. Instead, we decided to create our own P=NP, so here it is. Count the number of solutions to the equation

$$$P=N \cdot P$$$

when $$$0 \leq P \leq X$$$ and $$$0 \leq N \leq Y$$$ where $$$X$$$ and $$$Y$$$ are given as input.

Input

One line with two integers, $$$X$$$ and $$$Y$$$. ($$$1 \leq X, Y \leq 1000$$$). Note that despite $$$X$$$ and $$$Y$$$ being greater than $$$0$$$, $$$N$$$ and $$$P$$$ in the equation can be greater than or equal to $$$0$$$.

Output

A single integer denoting the number of pairs $$$(N, P)$$$ such that $$$P=N \cdot P$$$ and $$$(0 \leq N \leq X)$$$ and $$$(0 \leq P \leq Y)$$$.

ExampleInput
2 2
Output
5
Note

The valid pairs of $$$(N, P)$$$ are $$$(0, 0)$$$, $$$(1, 0)$$$, $$$(1, 1)$$$, $$$(1, 2)$$$, and $$$(2, 0)$$$.

Problem idea: chessbot

Problem preparation: chessbot

Occurances: Novice 1, Intermediate 1

加入题单

上一题 下一题 算法标签: