1152単語の個数問題
質問する
条件
アルゴリズム#アルゴリズム#
今日習った。
C
コード#コード#
福娃
#include <stdio.h>
#include <string.h>
int main(){
char input[1000000];
int word=0;
scanf("%[^\n]s", input);
char *token = strtok(input, " ");
while(token){
word++;
token = strtok(NULL, " ");
}
printf("%d", word);
return 0;
}
Reference
この問題について(1152単語の個数問題), 我々は、より多くの情報をここで見つけました https://velog.io/@dudgjs13579/1152번-단어의-개수-문제テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol