文章

81

粉丝

0

获赞

282

访问

11.0k

头像
字符串转化 题解:C++
P2020
发布于2025年3月15日 23:02
阅读数 260

#include<bits/stdc++.h>
using namespace std;
int main(){
	string s;
	int ans;
	while(cin>>s){
		ans=0;
		for(char c:s){
			ans+= c-'a'+1;
		}
		cout<<ans<<endl;
	}
	return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发