【Good Bye 2017 A】New Year and Counting Cards
【链接】 我是链接,点我呀:)
【题意】
【题解】
是元音字母或者是奇数就递增。【代码】
#include <bits/stdc++.h>
using namespace std;
map <char,int> dic;
int main(){
#ifdef LOCAL_DEFINE
freopen("rush_in.txt", "r", stdin);
#endif
ios::sync_with_stdio(0),cin.tie(0);
dic['a'] = 1;dic['e'] = 1;dic['i'] = 1;dic['o'] = 1;dic['u'] = 1;
for (char now = '1';now <='9';now+=2) dic[now] = 1;
string s;
cin >> s;
int len = s.size();
int cnt = 0;
for (int i = 0;i < len;i++){
if (dic[s[i]]) cnt++;
}
cout << cnt << endl;
return 0;
}