링크 : https://www.acmicpc.net/problem/1475
#include <iostream>
using namespace std;
int main(){
string number = "";
cin >> number;
int arr[10] = {};
for(int i = 0; i < number.size(); i++){
arr[number[i] - '0'] ++;
}
int ans = 0;
for(int i = 0; i< 10; i++){
if(i != 6 && i != 9) ans = max(ans, arr[i]);
}
cout << max(ans, (arr[6] + arr[9] +1) / 2);
return 0;
}