#include #include #include using namespace std; #define ULL unsigned long long vector maxVal(11); /* This function calculates (ab)%c */ int modulo(int a, int b, int c) { ULL x = 1, y = a; // long long is taken to avoid overflow of intermediate results while (b > 0) { if (b % 2 == 1) { x = (x*y) % c; } y = (y*y) % c; // squaring the base b /= 2; } return x%c; } bool Fermat(ULL p, int iterations) { if (p == 1) { // 1 isn't prime return false; } for (int i = 0; i> n; ULL ans = 0, tmp = 0;; for (int i = 0; i < n; i++) { cin >> tmp; ans += maxDiv(tmp); } cout <