错误:Time Limit Exceeded 这该怎么该
#include<stdio.h>int main()
{
long int m, n, i , j , count=0 ;
while(scanf("%ld %ld", &m, &n),m != 0, n != 0)
{
long int s = 0 ;
for(i = m ; i <= n ; i++)
{
for(j=1 ; j < i ; j++)
if(i%j == 0)
s=s+j ;
if(s == i)
{
if(count!=0)
printf(" ") ;
printf("%ld", i) ;
count++ ;
}
s = 0 ;
}
printf("\n") ;
count=0 ;
}
return 0 ;
}
题目链接 http://acm.sdut.