# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
407371 | 2021-05-18T19:48:57 Z | rainboy | Pot (COCI15_pot) | C | 1 ms | 280 KB |
#include <stdio.h> int power(int a, int k) { return k == 0 ? 1 : power(a, k - 1) * a; } int main() { int n, ans; scanf("%d", &n); ans = 0; while (n--) { int a; scanf("%d", &a); ans += power(a / 10, a % 10); } printf("%d\n", ans); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 280 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 204 KB | Output is correct |