14492022-10-10 18:17:21lacitoSzámjegy keveréscpp11Wrong answer 32/403ms4392 KiB
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    string s;
    cin >> s;
    int muvdb = 0;
    for (int i = 0; i < s.length(); i++)
    {
        muvdb += s[i] - '0';
    }
    int ossz = 0;
    for (int i = 1; i <= s.length() - 1; i++) {
        ossz += i;
    }
    cout << muvdb + 9 * ossz;
}

// 999 >> 991 >> 199 >> 190 >> 109 >> 100 >> 99
SubtaskSumTestVerdictTimeMemory
base32/40
1Accepted0/03ms1960 KiB
2Accepted0/02ms2232 KiB
3Accepted0/02ms2484 KiB
4Accepted2/22ms2544 KiB
5Accepted2/22ms2688 KiB
6Accepted2/22ms2944 KiB
7Accepted2/22ms2984 KiB
8Accepted2/22ms3096 KiB
9Accepted2/22ms3100 KiB
10Accepted2/22ms3056 KiB
11Accepted4/42ms3064 KiB
12Wrong answer0/42ms3172 KiB
13Accepted2/22ms3328 KiB
14Accepted2/22ms3500 KiB
15Accepted2/22ms3780 KiB
16Wrong answer0/22ms4012 KiB
17Wrong answer0/22ms3984 KiB
18Accepted2/22ms4016 KiB
19Accepted3/32ms4132 KiB
20Accepted3/32ms4392 KiB