diff --git a/3033/solutie.cpp b/3033/solutie.cpp new file mode 100644 index 0000000..950a7c2 --- /dev/null +++ b/3033/solutie.cpp @@ -0,0 +1,27 @@ +#include +#include + +using namespace std; + +int main() { + int n, a=0, cp = 0, s = 0, b=0; + cin >> n; + for (int i = 0; i < n; i++) { + cin >> b; + cp = b; + a = 0; + while (cp != 0) { + a++; + cp = cp / 10; + } + cp = b; + if (a % 2 == 1) { + for (int j = 0; j < (a-1)/2; j++) { + cp = cp / 10; + } + s = s + (cp%10); + } + } + cout << s; + return 0; +}