35902023-03-01 09:19:22Error42Decimáliacpp17Runtime error 0/10023ms16728 KiB
#include <iostream>
#include <vector>

using namespace std;
#define int long long

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int a;
    cin >> a;
    int cur = 0;
    string s = "";
    for (size_t i = 0; i < a; i++)
    {
        cur/=10;
        int b;
        cin >> b;
        cur+=b;
        //cout << cur << "\n";
    }
    int tV = 1;
    for (size_t i = 0; i < 18; i++)
    {
        if(tV>cur) {
            cur=cur-(cur%(tV/10));
            break;
        }
        tV*=10;
    }
    for (size_t i = 0; i < a-1; i++)
    {
        s+='0';
    }
    cout << cur << s << "\n";
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1836 KiB
2Accepted3ms2056 KiB
3Accepted3ms2256 KiB
subtask20/25
4Runtime error3ms2420 KiB
5Runtime error3ms2548 KiB
6Runtime error3ms2632 KiB
7Runtime error3ms2600 KiB
8Runtime error3ms3008 KiB
subtask30/26
9Runtime error3ms3024 KiB
10Runtime error3ms3152 KiB
11Runtime error3ms3108 KiB
12Runtime error3ms3112 KiB
13Runtime error3ms3108 KiB
14Accepted3ms3132 KiB
15Accepted3ms3132 KiB
16Accepted3ms3368 KiB
subtask40/19
17Wrong answer3ms3632 KiB
18Wrong answer3ms3568 KiB
19Wrong answer3ms3668 KiB
20Wrong answer3ms3828 KiB
subtask50/30
21Wrong answer23ms6336 KiB
22Wrong answer23ms8300 KiB
23Wrong answer23ms10168 KiB
24Wrong answer21ms11976 KiB
25Wrong answer23ms13724 KiB
26Wrong answer23ms15868 KiB
27Accepted14ms16728 KiB
28Wrong answer3ms16476 KiB