📄 2030.cpp
字号:
/*
2030 汉字统计
Time Limit : 1000 ms Memory Limit : 32768 K Output Limit : 256 K
GUN C++
*/
#include <iostream>
using namespace std;
const int Max=1000;
int main()
{
int t,ca,total;
char str[Max],*temp;
cin>>t;
cin.ignore(1);
for(ca=0;ca<t;ca++)
{
cin.getline (str,Max);
total=0;
temp=str;
while(*temp!='\0')
{
//cout<<int(*temp)<<endl;
if(*temp<0)
total++;
temp++;
}
cout<<total/2<<endl;
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -