# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
866387 | Tejas_Mondeeri | Pot (COCI15_pot) | C++14 | 0 ms | 436 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.
// 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 |
---|---|---|---|---|
Fetching results... |