Submission #1088263

#TimeUsernameProblemLanguageResultExecution timeMemory
1088263nguyen31hoang08minh2003Pot (COCI15_pot)C++17
50 / 50
1 ms348 KiB
#include <bits/stdc++.h>

using namespace std;

constexpr int MAX_N = 20;

signed main() {
    int N, P[MAX_N];
    long long X = 0, p, b, e;

    #ifdef LOCAL
    freopen("input.INP", "r", stdin);
    #endif // LOCAL
    cin.tie(0) -> sync_with_stdio(0);
    cout.tie(0);

    cin >> N;

    for (int i = 0; i < N; ++i) {
        cin >> P[i];
        for (p = 1, b = P[i] / 10, e = P[i] % 10; e; --e)
            p *= b;
        X += p;
    }

    cout << X << '\n';

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...