제출 #253942

#제출 시각아이디문제언어결과실행 시간메모리
253942VEGAnnPot (COCI15_pot)C++14
50 / 50
1 ms384 KiB
#include <bits/stdc++.h>
using namespace std;
int ans, n;

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);

#ifdef _LOCAL
    freopen("in.txt","r",stdin);
#endif // _LOCAL

    cin >> n;

    for (int i = 0; i < n; i++){
        int x; cin >> x;

        int po = x % 10;
        x /= 10;

        ans += (int)pow(x, po);
    }

    cout << ans;

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...