题解
2023-07-28 10:07:55
发布于:河北
1阅读
0回复
0点赞
#include <iostream>
using namespace std;
int main()
{
int n, m, lx = 0, jx = 0, zc = 0;
char x;
cin>>n>>m;
for(int i = 1; i <= n; i++)
{
for(int j = 1; j <= m; j++)
{
cin>>x;
if(x == '*')
++lx;
if(x == '_')
++zc;
if(x == '&')
++jx;
}
}
cout<<lx<<endl;
cout<<jx<<endl;
cout<<zc;
return 0;
}
这里空空如也
有帮助,赞一个