#include <bits/stdc++.h>
using namespace std;
string n;
int d,i,t,x;
int main()
{
freopen("tong.inp","r",stdin);
freopen("tong.out","w",stdout);
cin>>st;
d=st.length();
t=0;
for (i=0; i<=d; i++)
{
x=int(st[i])-48;
t=t+x;
}
cout<<t;
return 0;
}
Đúng 1
Bình luận (0)