top1编程
← 返回题目
题解

【基础】英文统计

1 条题解

  • 0
    @ 2026-7-29 0:17:18
    #include<bits/stdc++.h>
    using namespace std;
    double s;
    int i,l;
    string a,b;
    int main(){
        while(cin>>a){
            i++;
            if(l<a.size()){
                l=a.size();
                b=a;
            }s+=a.size();
        }cout<<i<<endl;
        cout<<fixed<<setprecision(1)<<s/i<<endl;
        cout<<b;
        return 0;
    }
    
    • 1