2 条题解
-
3便秘 (cuiyangyang1) LV 7 @ 2024-11-16 15:57:58
这才是认真作弊🎉️#include <stdio.h> #include <string.h> #include <math.h> #include <ctype.h> #define MAXN 300000 char s[MAXN]; int main(){ fgets(s,sizeof(s),stdin); int cnt = 0 ; int len = strlen(s); int flag = 1 , d = 0; for(int i = 0;i<len;i++){ if(isalpha(s[i])){ if(0-flag!=0)cnt++; flag = 0; d++; }else{flag = 1;} } printf("%.1lf\n",d,cnt,1.0*d/cnt); return 0; }
-
32024-11-16 13:45:51@
点赞吧
allright
#include<bits/stdc++.h> #define int long long #define INF 0x3f3f3f3f #define INFSHORT 1e+3 #define INFINT 1e+10 #define INFLONGLONG 1e+19 using namespace std; char a[1919180]; double sum,l; signed main(){ while(cin>>a){ sum+=strlen(a); l++; } cout<<fixed<<setprecision(1)<<sum/l; return 0; }
- 1
信息
- ID
- 1094
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 8
- 标签
- 递交数
- 461
- 已通过
- 60
- 上传者