#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
// 파라미터로 주어지는 문자열은 const로 주어집니다. 변경하려면 문자열을 복사해서 사용하세요.
int* solution(const char* s) {
// return 값은 malloc 등 동적 할당을 사용해주세요. 할당 길이는 상황에 맞게 변경해주세요.
int* answer = (int*)malloc(sizeof(int) * 2);
char* str=(char*)malloc(sizeof(char)*(strlen(s)+1));
int i,j,cnt=0,c=0,a=0;
strcpy(str,s);
for(i=0;i<strlen(s);i++)
{
if(strlen(s)==1&&s[0]==1)
{
break;
}
if(s[i]==1)
{
cnt++;
}
c=cnt;
for(j=0;cnt<1;j++)
{
s[j]=(c%2);
c=(cnt/2);
}
a++;
}
answer[0]=a;
answer[1]=cnt;
return answer;
}