Codeforces Round #319 (Div. 2)A Multiplication Table
标签: Codeforces Round #319 (Div. 2)A Multiplication Table HarmonyOS博客 51CTO博客
2023-06-09 18:24:55 197浏览
思路:水题
#include<bits\stdc++.h>
using namespace std;
int main()
{
int n,x;
cin >> n >>x;
int ans = 0;
for(int i = 1;i<=n;i++)
{
if(x%i==0&&x/i<=n)
ans++;
}
cout <<ans <<endl;
}
A. Multiplication Table
time limit per test
memory limit per test
input
output
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.
x. Your task is to count the number of cells in a table that contain number x.
Input
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
x
Examples
input
10 5
output
2
input
6 12
output
4
input
5 13
output
0
Note
12

好博客就要一起分享哦!分享海报
此处可发布评论
评论(0)展开评论
展开评论
您可能感兴趣的博客
