HZNUOJ


Problem_ID: C
Result: Accepted
Time: 5ms
Memory: 1092kB
Author: 1546769141
In contest: 1141

#include<stdio.h>
int main(void){
	char S[1000];
	gets(S);
	if(S[0]!=S[1]&&S[0]!=S[2])printf("0");
	else{
	for(int i=1;i<1000;i++){
		if(S[i]!=S[i-1]){
		printf("%d",i);
		break;}
	}
}
}