7 条题解
- 1
信息
- ID
- 2026
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 4
- 标签
- 递交数
- 266
- 已通过
- 122
- 上传者
#include<bits/stdc++.h>
using namespace std;
string a;
int main(){
int sum=0;
cin>>a;
int la=a.size();
for (int i =0;i<la;i++){
sum+=a[i]-'0';
}
cout<<sum;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
string s;
int main(){
cin>>s;
long long sum=0;
for(int i=0; i<s.size();i++){
sum=sum+s[i]-'0';
}
cout<<sum; return 0;
}
#include<bits/stdc++.h> using namespace std; int main(){ char a[210]; int i,s=0; cin>>a; for(i=0;i<strlen(a);i++){ s=s+(a[i]-48); } cout<<s; return 0; }
using namespace std;
string s;
int main(){
cin>>s;
long long sum=0;
for(int i=0; i<s.size();i++){
sum=sum+s[i]-'0';
}
cout<<sum;
return 0;
}
https://theuselessweb.com https://puginarug.com https://optical.toys/thatcher-effect/ https://memory.toys/classic/medium/ https://maze.toys/mazes/mini/daily/ https://cursoreffects.com/ 好玩网站
什么?哼!