35912023-03-01 09:22:47Error42Decimáliacpp17Wrong answer 30/10023ms4876 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++)
    {
        tV*=10;
        if(tV>cur) {
            cur=cur-(cur%(tV/10));
            break;
        }
    }
    for (size_t i = 0; i < a-1; i++)
    {
        s+='0';
    }
    cout << cur << s << "\n";
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1832 KiB
2Accepted3ms2052 KiB
3Accepted3ms2428 KiB
subtask20/25
4Wrong answer3ms2352 KiB
5Wrong answer3ms2552 KiB
6Wrong answer3ms2760 KiB
7Wrong answer3ms2976 KiB
8Wrong answer3ms3060 KiB
subtask30/26
9Wrong answer3ms3436 KiB
10Wrong answer3ms3332 KiB
11Wrong answer3ms3344 KiB
12Wrong answer3ms3436 KiB
13Wrong answer3ms3672 KiB
14Accepted3ms3756 KiB
15Accepted3ms3752 KiB
16Accepted3ms3728 KiB
subtask40/19
17Accepted3ms3960 KiB
18Wrong answer3ms3936 KiB
19Accepted3ms3844 KiB
20Accepted3ms3940 KiB
subtask530/30
21Accepted23ms4228 KiB
22Accepted21ms4224 KiB
23Accepted23ms4444 KiB
24Accepted23ms4876 KiB
25Accepted21ms4756 KiB
26Accepted23ms4596 KiB
27Accepted14ms4784 KiB
28Accepted3ms4628 KiB