# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1088263 | nguyen31hoang08minh2003 | Pot (COCI15_pot) | C++17 | 1 ms | 348 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |