Skip to content
neuroai

neuroai

  • Home
  • All Courses
  • Log In
  • About
neuroai
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 Lesson
Back to Lesson
Next Topic

About NeuroAI

NeuroAI 提供 C++、数据结构与算法、信息学真题、数学竞赛和 AP 微积分课程。

Courses

All Courses
C++ 程序设计
数据结构与算法
信息学奥赛真题

Account

Log In
Lost Password

© 2026 neuroai - WordPress Theme by Kadence WP

Facebook X Instagram
Scroll to top
  • Home
  • All Courses
  • Log In
  • About