Submission #1198751

#TimeUsernameProblemLanguageResultExecution timeMemory
1198751THXuanPot (COCI15_pot)C++20
50 / 50
0 ms328 KiB
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <queue> #include <set> #include <map> #define INF 1e9 using namespace std; typedef long long ll; const ll MAXN = 100005; void solve() { int n; cin >> n; ll ans = 0; for (int i = 0; i < n; i++) { int v; cin >> v; int p = v % 10; v /= 10; ans += pow(v, p); } cout << ans << "\n"; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); int t = 1;// cin>>t; while (t--) solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...