明天联发科笔试。刷一下C语言哈哈

#include <stdio.h>

int main(int argc, char *argv[]) {
  int res = 0;
  char ch;
  char blank = ' ';
  while ((ch = getchar()) != '\n') {
    if (ch != blank) {
      ++res;
    } else {
      res = 0;
    }
  }
  printf("%d\n", res);
  return 0;
}