Submission #1173288

#TimeUsernameProblemLanguageResultExecution timeMemory
1173288NomioPot (COCI15_pot)C++20
50 / 50
0 ms328 KiB
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n;
	cin >> n;
	ll s = 0;
	for(int i = 0; i < n; i++) {
		int x;
		cin >> x;
		int a = x % 10;
		x /= 10;
		ll S = 1;
		for(int j = 0; j < a; j++) {
			S *= x;
		}
		s += S;
	}
	cout << s << '\n';
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...