[计蒜客][字符串]字符串A的数量 原创

算法标签

字符串

来源

计蒜客2020蓝桥杯习题

题目简介

在这里插入图片描述

思路

AC代码

#include<iostream>
#include<cstring>

using namespace std;

int main()
{
  string s;
  cin>>s;
	
  int cnt=0;
  for(auto op:s)if(op=='A')cnt++;
  
  cout<<cnt;
  
  return 0;
}
posted @ 2022-03-06 23:00  俺叫西西弗斯  阅读(0)  评论(0)    收藏  举报  来源