Submission #397463

#TimeUsernameProblemLanguageResultExecution timeMemory
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...