|
|
вернуться в форумwa4 i had wa4. when i change code like while(a[i]>1) { b=1; for(int j=2; j<=sqrt((double)a[i]); j++)if(a[i]%j==0) { aa[j]++; a[i]/=j; b=0; } if(b) { aa[a[i]]++; a[i]=1; } } to while(a[i]>1) { b=1; for(int j=2; j<=sqrt((double)a[i]); j++)if(a[i]%j==0) { while(a[i]%j==0) { aa[j]++; a[i]/=j; } b=0; } if(b) { aa[a[i]]++; a[i]=1; } } i get ac... why? can u give me bad test for first?? |
|
|