#include <stdio.h> #include <math.h> int main(int argc, char const *argv[]) { long long num, pro = 1, sq, count = 0; for (int i = 0; i < 10; ++i) { scanf("%lld", &num); pro *= num; } sq = sqrt(pro); for (int i = 1; i <= sq; ++i) { if (pro % i == 0) { if (i * i == pro) { count += 1; } else { count += 2; } } } printf("%lld\n", count % 10); return 0; } |
Double click to view unformatted code.