173362025-06-27 21:38:4642thebestestDecimáliacpp17Accepted 100/10082ms548 KiB
#include <bits/stdc++.h>
#include <cmath>
using namespace std;

int main() {
	unsigned long long N, m, t = 0, l, maxi = 0, maxm = 0; cin >> N;
    string s;
    for (int i = 0; i < N; i++) {
        cin >> m;
        m += t;
        t = m / 10;
        if (m != 0) {
            unsigned long long fd = m;
            l = 0;
            while (fd >= 10) {
                fd /= 10;
                l++;
            }
            maxm = fd;
            maxi = i + l;
        }
}

    cout << maxm;
    for (int j = 0; j < maxi; j++) {
        cout << "0";
    }
    cout << endl;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms316 KiB
2Accepted1ms316 KiB
3Accepted1ms316 KiB
subtask225/25
4Accepted1ms316 KiB
5Accepted1ms360 KiB
6Accepted1ms316 KiB
7Accepted1ms316 KiB
8Accepted1ms316 KiB
subtask326/26
9Accepted1ms316 KiB
10Accepted1ms316 KiB
11Accepted1ms316 KiB
12Accepted1ms316 KiB
13Accepted1ms316 KiB
14Accepted1ms316 KiB
15Accepted1ms316 KiB
16Accepted1ms508 KiB
subtask419/19
17Accepted2ms316 KiB
18Accepted2ms316 KiB
19Accepted2ms316 KiB
20Accepted2ms316 KiB
subtask530/30
21Accepted81ms392 KiB
22Accepted81ms396 KiB
23Accepted82ms548 KiB
24Accepted81ms396 KiB
25Accepted81ms316 KiB
26Accepted81ms508 KiB
27Accepted50ms316 KiB
28Accepted1ms316 KiB