1 条题解

  • 0
    @ 2022-6-24 4:50:47

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    char s[1000];
    int len,sum=0;
    int main() {
    	scanf("%[^\n]",s);
    	len=strlen(s);
    	for(int i=0; i<len; i++)
    		if(s[i]!=' ')
    			sum++;
    	printf("%d\n",sum);
    
    	return 0;
    }
    
    
    • 1

    信息

    ID
    140
    时间
    1000ms
    内存
    128MiB
    难度
    10
    标签
    递交数
    1
    已通过
    1
    上传者