|
|
back to boardWhy Crash??? #include <iostream.h> int div[10000]; int A[10]; void del(int); int main(void) { int Q = 1; for(int i = 0 ; i < 10 ; ++i) cin >> A[i]; for(int i = 0 ; i < 10 ; ++i) del(A[i]); for(int i = 0 ; i < 10000 ; ++i) { Q *= (div[i] + 1); Q %= 10; }; cout << Q; return 0; }; void del(int a) { int d = 2; while(a != 1) { if(a % d) { if(d == 2) d = 3; else d += 2; }else { a /= d; ++div[d]; div[d] %= 10; }; }; }; |
|
|