输入一个n 构成一个n*n的表 这个表里的数 第i行j列的值为i*j 问x在这个表里出现了几次
Sample test(s)
input
10 5
output
2
input
6 12
output
4
input
5 13
output
0
1 # include <iostream> 2 # include <cstdio> 3 # include <cstring> 4 # include <algorithm> 5 # include <string> 6 # include <cmath> 7 # include <queue> 8 # include <list> 9 # define LL long long 10 using namespace std ; 11 12 int main() 13 { 14 //freopen("in.txt","r",stdin) ; 15 int n , t; 16 while(scanf("%d %d",&n , &t) != EOF) 17 { 18 int sum = 0 ; 19 int i ; 20 for (i = 1 ; i <= n ; i++) 21 { 22 if (t % i == 0 && t / i <= n) 23 sum++ ; 24 } 25 printf("%d " , sum) ; 26 } 27 28 29 30 return 0; 31 }