跳到内容

neuroai

  • Home
  • All Courses
  • 科研研学
  • 更新日志
  • 点名系统
  • Log In
  • About
neuroai

复赛一:标题统计(title)

  1. 信息学奥赛历年真题
  2. 2018年NOIP普及组真题
  3. 复赛一:标题统计(title)

洛谷:P5015
OJ: P4959

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#include<iostream>
#include <string>
using namespace std;

int main(){
    string str;
    int a,n=0;
    getline(cin, str);
    a=str.length();
    for (int i = 0; i <a; i++)
    if((str[i]>='a'&&str[i]<='z')||(str[i]>='A'&&str[i]<='Z')||(str[i]>='0'&&str[i]<='9'))n++;
    cout<<n;
}
Previous 课
Back to 课
Next 主题

© 2026 neuroai Kadence WP 制作的 WordPress 主题

  • Home
  • All Courses
  • 科研研学
  • 更新日志
  • 点名系统
  • Log In
  • About