14502022-10-10 18:19:53lacitoSzámjegy keveréscpp11Wrong answer 32/403ms4092 KiB
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    string s;
    cin >> s;
    long long muvdb = 0;
    for (int i = 0; i < s.length(); i++)
    {
        muvdb += s[i] - '0';
    }
    long long ossz = 0;
    for (int i = 1; i <= s.length() - 1; i++) {
        ossz += i;
    }
    cout << muvdb + 9 * ossz;
}
SubtaskSumTestVerdictTimeMemory
base32/40
1Accepted0/03ms2088 KiB
2Accepted0/02ms2328 KiB
3Accepted0/02ms2332 KiB
4Accepted2/22ms2436 KiB
5Accepted2/22ms2576 KiB
6Accepted2/22ms2672 KiB
7Accepted2/22ms2640 KiB
8Accepted2/22ms3044 KiB
9Accepted2/22ms2956 KiB
10Accepted2/22ms2956 KiB
11Accepted4/42ms3108 KiB
12Wrong answer0/42ms3296 KiB
13Accepted2/22ms3392 KiB
14Accepted2/22ms3520 KiB
15Accepted2/22ms3724 KiB
16Wrong answer0/22ms3888 KiB
17Wrong answer0/22ms3964 KiB
18Accepted2/22ms3992 KiB
19Accepted3/32ms4092 KiB
20Accepted3/32ms3968 KiB