|
|
back to boardWA#1 But i test it myself and it works!! TwT #include<stdio.h> int arr[11]; int num = 1; int prime[10000]; int ans = 1; int main() { for( int j = 0 ; j< 10 ; j++ ) { scanf("%d",&arr[j]); if( arr[j] == 1 ) { continue; } for( int i = 2 ; i <= arr[j] ; i++ ) { while( arr[j] % i == 0 ) { prime[i]++; arr[j] = arr[j] /i; if( arr[j] == 1 ) { break; } } } }
for( int i = 2 ; i < 10001 ; i++ ) { ans *= (prime[i]+1) % 10 ; } ans = ans % 10; printf("%d\n",ans); //scanf("%d",&prime[0]); return 0; } |
|
|