// pot
#include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll long long
void fn()
{
// fstream myfile;
// myfile.open("inp.txt", ios::in);
int n, sol = 0;
cin >> n;
vector<int> nums(n);
for (int i = 0; i < n; i++)
{
cin >> nums[i];
int base = nums[i] / 10, p = nums[i] % 10;
sol += pow(base, p);
}
cout << sol << endl;
}
int main()
{
int t = 1;
// cin>>t;
while (t--)
fn();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
436 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |