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 numberi × 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.

Examples
input
10 5
output
2
input
6 12
output
4
input
5 13
output
0


Note

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

 #include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std;
#define ll long long
int main()
{
ll n,x;
while(cin>>n>>x){
int s=;
for(ll i=;i<=n;i++){
if(x%i==&&x<=i*n) s++;
}
cout<<s<<endl;
}
return ;
}

Codeforces 577A - Multiplication Table的更多相关文章

  1. CodeForces 577A Multiplication Table 质因子数

    题目:click here 题意:看hint就懂了 分析:数论小题,在n0.5时间里求n的质因子数 #include <bits/stdc++.h> using namespace std ...

  2. codeforces D. Multiplication Table

    http://codeforces.com/contest/448/problem/D 题意:一个n×m的矩阵,a[i][j]=i*j; 然后把a数组排序,找出第k个数. 思路:1-n×m二分枚举,然 ...

  3. Codeforces 1220B. Multiplication Table

    传送门 冷静分析容易发现,我们只要能确定一个数的值,所有值也就可以确定了 确定一个数的值很容易,$a_ia_j=M_{i,j},a_ia_k=M_{i,k},a_ja_k=M_{j,k}$ 然后就可以 ...

  4. Codeforces Codeforces Round #319 (Div. 2) A. Multiplication Table 水题

    A. Multiplication Table Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/57 ...

  5. Codeforces Round #256 (Div. 2) D. Multiplication Table(二进制搜索)

    转载请注明出处:viewmode=contents" target="_blank">http://blog.csdn.net/u012860063?viewmod ...

  6. Codeforces Round #586 (Div. 1 + Div. 2) B. Multiplication Table

    链接: https://codeforces.com/contest/1220/problem/B 题意: Sasha grew up and went to first grade. To cele ...

  7. Codeforces Round #256 (Div. 2) D. Multiplication Table 二分法

     D. Multiplication Table time limit per test 1 second memory limit per test 256 megabytes input st ...

  8. Codeforces 448 D. Multiplication Table

    二分法判断答案 D. Multiplication Table time limit per test 1 second memory limit per test 256 megabytes inp ...

  9. Codeforces 448 D. Multiplication Table 二分

    题目链接:D. Multiplication Table 题意: 给出N×M的乘法矩阵要你求在这个惩罚矩阵中第k个小的元素(1 ≤ n, m ≤ 5·10^5; 1 ≤ k ≤ n·m). 题解: n ...

随机推荐

  1. Mock模拟数据,前后端分离

    安装 使用npm安装: npm install mockjs; 或直接<script src="http://mockjs.com/dist/mock.js">< ...

  2. 11种常用css样式之开篇文本字体学习

    常见css样式:1.字体与颜色2.背景属性3.文本属性4.边框属性5.鼠标光标属性6.列表样式7.定位属性8.内外边距9.浮动和清除浮动10.滚动条11.显示和隐藏 文本:1.letter-spaci ...

  3. 伪造TGT黄金票据

    通过上一篇文章我们初步了解了Kerberos协议的工作过程,解决的两个问题 第一个问题:如何证明你本人是XXX用户的问题   由Authentication Server负责 第二个问题:提供服务的服 ...

  4. Windows server 2012 出现大量无名已断开连接用户清楚办法

    打开cmd命令窗口,执行  taskkill /f /im winlogon.exe /t

  5. centos7使用fdisk:创建和维护MBR分区表

    1.在VMware选择要添加硬盘的虚拟机,添加一块硬盘. 这样就有两块硬盘 2.重启虚拟机. cd /dev #dev是设备目录,下面有很多很多设备,其中就包含硬盘 ll grep | sd #过滤s ...

  6. PMP--2.2 效益管理计划

    一.文件背景概述 ​​​1. 所需文件/数据 制定效益管理计划需要使用商业论证和需求评估中的数据和信息,例如,成本效益分析数据. 成本效益分析数据是在商业论证和需求评估中得到的,在成本效益分析中已经把 ...

  7. 在本地搭建git服务器

    GitHub就是一个免费托管开源代码的远程仓库.但是对于某些视源代码如生命的商业公司来说,既不想公开源代码,又舍不得给GitHub交保护费,那就只能自己搭建一台Git服务器作为私有仓库使用. 搭建Gi ...

  8. Rx基础

    >>返回<C# 并发编程> 1. 转换.NET事件 1.1. 进度通知 1.2. 定时器示例 1.3. 错误传递 2. 发通知给上下文 3. 用窗口和缓冲对事件分组 4. 用限 ...

  9. 关于非旋转Treap

    刚刚跟着EM-LGH大佬学了非旋转Treap 非常庆幸不用再写万恶的rotate了(来自高级数据结构的恶意) 来记一下 Treap 概念 简单来说,\(Tree_{二叉搜索树} * Heap_堆 = ...

  10. kaks calculator批量计算多个基因的选择压力kaks值

    欢迎来到"bio生物信息"的世界 今天给大家带来"批量计算kaks值"的技能. 关于kaks的背景知识我就不介绍了,感兴趣的自行搜索,这里直接开始讲怎么批量计算 ...