Created
September 7, 2021 22:11
-
-
Save Rockbet/7ec998bde9a5c89b246eadf48759e2a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
int freq[26]; | |
int main(){ | |
ios_base::sync_with_stdio(false); cin.tie(NULL); | |
int n; | |
cin >> n; | |
int soma = 0; | |
for(int i=1; i<=n; i++){ | |
int num; | |
cin >> num; | |
int p = num%10; | |
num /= 10; | |
int valor = 1; | |
for(int j=1; j<=p; j++){ | |
valor *= num; | |
} | |
soma += valor; | |
} | |
cout << soma << "\n"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment