Skip to content

Instantly share code, notes, and snippets.

@pazthor
Created October 15, 2015 21:00
Show Gist options
  • Save pazthor/be5c66f77eca71a1a8b6 to your computer and use it in GitHub Desktop.
Save pazthor/be5c66f77eca71a1a8b6 to your computer and use it in GitHub Desktop.
/*
*problem: http://codeforces.com/contest/577/problem/A
*
*solution: http://codeforces.com/blog/entry/20226
*/
#include<stdio.h>
int main(){
int n,i, x,j;
int count = j=0;
scanf("%d %d", &n, &x);
if (x <= n) count++;
for( i = 2 ;i <= n ; i++){
j = x / i;
if( (j * i) == x && j <= n ) count++;
}
printf("%d\n", count);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment