https://www.acmicpc.net/problem/1475
#include<stdio.h>
#include <string.h>
int main() {
int n;
scanf("%d",&n);
int arr[10]={};
int count=0;
char k[10];
sprintf(k,"%d",n);
for(int i=0;i<strlen(k);i++){
arr[n%10]++;
n/=10;
}
arr[6]+=arr[9];
arr[9]=0;
for(int i=0;i<10;i++){
int a=0;
if(i==6){
if(arr[i]%2==0) a=arr[i]/2;
else a=(arr[i]/2)+1;
}
else a=arr[i];
if(a>=count) count=a;
}
printf("%d",count);
}