제출 #397463

#제출 시각아이디문제언어결과실행 시간메모리
397463AlmaPot (COCI15_pot)C++17
50 / 50
1 ms316 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    int n; cin >> n;
    int num, pot, sum = 0;
    while (n--) {
        cin >> num;
        pot = num % 10; num /= 10;
        sum += pow(num, pot);
    }
    cout << sum << '\n';
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...