# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
340086 | ammar2000 | Pot (COCI15_pot) | C++17 | 1 ms | 364 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;
long long n,x;
int power(int b,int p)
{
if (p==0)
return 1;
int qw=1;
for (int i=0;i<p;i++)
qw*=b;
return qw;
}
int main()
{
cin>>n;
while (n--)
{
int y;
cin>>y;
int w=y%10;
y/=10;
x+=power(y,w);
// cout <<y<<" "<<w<<" "<<x<<"\n";
}
cout <<x;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |