华为机试字符串篇: 字符串篇:1.计算字符串最后一个单词的长度,单词以空格隔开。 输入描述:一行字符串,非空,长度小于5000。输出描述:整数N,最后一个单词的长度。示例1输入hello world输出5#include <iostream>#include <string>using namespace std;string re;int main(){ getline(... 笔试题 2023-09-07 140 点赞 2 评论 212 浏览