|
|
back to boardwhat is the crash error?please help me Posted by Milad 7 Sep 2012 16:26 this is my code so what is the crash error # include <iostream> # include <vector> using namespace std; const int maxN=10000+10; int p[maxN],t[maxN]; vector <int> v; int main () { int n,sum=1;
for (int i=2;i<=maxN;i++) for (int j=2*i;j<=maxN;j+=i) p[j]=1; for (int j=1;j<=10;j++) { cin>>n; for (int i=2;i<=n;i++) { int len = n; while (len>1 && !p[i] && len%i==0) { len/=i; v.push_back(i); } } }
for (int i=0;i<v.size();i++) t[v[i]]++; for (int i=2;i<maxN;i++) if (t[i]>0) { t[i]++; sum*=t[i]; sum%=10; } cout<<sum%10; //cin>>n; return 0; } |
|
|