75622024-01-09 17:13:50horvathabelSzámjegy keveréscpp17Wrong answer 32/403ms3372 KiB
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main()
{
    string a;
    cin>>a;
    int n=a.size();
    ll ans=0;
    for (char x:a){
        ans+=x-'0';
    }
    for (int i=n-1; i>0; i--) ans+=9*i;
    cout<<ans;

}
SubtaskSumTestVerdictTimeMemory
base32/40
1Accepted0/03ms1964 KiB
2Accepted0/03ms2192 KiB
3Accepted0/03ms2472 KiB
4Accepted2/23ms2480 KiB
5Accepted2/23ms2600 KiB
6Accepted2/23ms2844 KiB
7Accepted2/23ms2900 KiB
8Accepted2/23ms2980 KiB
9Accepted2/23ms3256 KiB
10Accepted2/23ms3072 KiB
11Accepted4/43ms3076 KiB
12Wrong answer0/43ms3220 KiB
13Accepted2/23ms3224 KiB
14Accepted2/23ms3112 KiB
15Accepted2/23ms3372 KiB
16Wrong answer0/23ms3348 KiB
17Wrong answer0/23ms3328 KiB
18Accepted2/23ms3332 KiB
19Accepted3/33ms3332 KiB
20Accepted3/33ms3232 KiB