关于c++:题解洛谷-P5015-标题统计

洛谷 P5015 题目统计

水题

代码

/*
 * @Description: 
 * @Author: 多多
 * @Date: 2020-10-24 22:51:24
 * @LastEditTime: 2020-10-24 22:53:02
 * @LastEditors: 多多
 */
#include <bits/stdc++.h>
using namespace std;

int main()
{
    freopen64("P5015.in", "r", stdin);
    ios::sync_with_stdio(false);
    cin.tie(0);
    string s;
    int sum = 0;
    while (cin >> s)
    {
        sum += s.length();
    }
    cout << sum << endl;
    return 0;
}

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理