제출 #624238

#제출 시각아이디문제언어결과실행 시간메모리
624238MilosMilutinovicPot (COCI15_pot)C++14
50 / 50
1 ms296 KiB
/**
 *    author:  wxhtzdy
 *    created: 07.08.2022 15:52:28
**/
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);  
  int n;
  cin >> n;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    int p = x % 10;
    x /= 10;
    int pw = 1;
    while (p--) {
      pw *= x;
    }
    ans += pw;
  }
  cout << ans << '\n';                                                         
  return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...