直接计算即可 #include <stdio.h> #include <string.h> #include <math.h> #define N 100 int main() { char s[N]; int ans; while(scanf("%s",s)!=EOF) { &nbs...