1、2、3… …n这n(0<n<=1000000000)个数中有多少个数可以被正整数b整除。
2 1 5 3 10 4
2 1 2
#include<stdio.h>
int main()
{
int
n,i,m;
while(scanf("%d
%d",&m,&n)!=EOF)
{
i=m/n;
printf("%d\n",i);
}
return
0;
}
很简单的一个题,但是AC率并不高,因为用循环的话会超时。仔细看题,多思多想,才是关键。
原文:http://www.cnblogs.com/dreamgoing/p/3575095.html