您的位置:首页 > 其它

CodeForces - 577A Multiplication Table(水)

2016-04-10 22:24 309 查看
CodeForces
- 577A
Multiplication Table

Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u
Submit Status

Description

Let's consider a table consisting of n rows and n columns. The cell located
at the intersection of i-th row and j-th column contains number i × j.
The rows and columns are numbered starting from 1.

You are given a positive integer x. Your task is to count the number of cells in a table that contain number x.

Input

The single line contains numbers n and x (1 ≤ n ≤ 105, 1 ≤ x ≤ 109)
— the size of the table and the number that we are looking for in the table.

Output

Print a single number: the number of times x occurs in the table.

Sample Input

Input
10 5


Output
2


Input
6 12


Output
4


Input
5 13


Output
0


Hint

A table for the second sample test is given below. The occurrences of number 12 are marked bold.



Source
Codeforces Round #319 (Div. 2)
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<map>
#include<queue>
#include<stack>
#include<algorithm>
#include<iostream>
#define INF 0x3f3f3f3f
#define ull unsigned long long
#define long long
#define IN __in64#define N 100010#define M 1000000007
using namespace std;
int main()
{
int n,m;
while(scanf("%d%d",&n,&m)!=EOF)
{
int cnt=0;
for(int i=1;i<=n;i++)
{
if(m%i==0&&m/i<=n)
cnt++;
}
printf("%d\n",cnt);
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: