#include #include //文字列の連結に必要なもの #define MaxDay (14) //定数 void main(void){ int longestDay = 0; char firstweek[100] = "a"; scanf("%s\n",firstweek); char secondweek[100] = "b"; scanf("%s\n",secondweek); char *goldenWeek; strcat(firstweek, secondweek); int count = 0; for(int i = 0 ; i < MaxDay ; i++){ if(firstweek[i] == 'o'){ count++; }else{ if(longestDay > count){ longestDay = count; } count = 0; } } printf("%d\n",longestDay); }