Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main(){
- string str;
- cin.sync();
- getline(cin, str);
- int len = str.length();
- string bulb = "Bulbasaur";
- int ara[7] = {0, 0, 0, 0, 0, 0, 0};
- for(int i = 0; i < len; i++){
- if(str[i] == 'B') ara[0]++;
- if(str[i] == 'l') ara[1]++;
- if(str[i] == 'b') ara[2]++;
- if(str[i] == 's') ara[3]++;
- if(str[i] == 'r') ara[4]++;
- if(str[i] == 'a') ara[5]++;
- if(str[i] == 'u') ara[6]++;
- }
- ara[5] = ara[5]/2;
- ara[6] = ara[6]/2;
- int pokemon = ara[0];
- for(int i = 0; i < 7; i++){
- if(ara[i] < pokemon){
- pokemon = ara[i];
- }
- }
- cout << pokemon << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement