문제 링크는 여기 https://www.acmicpc.net/problem/17210


소스코드는 아래에 


#include


int main() {

int door, way, two, three, i = 2, stc = 0;

scanf_s("%d %d", &door, &way);

two = way ? 0 : 1;

three = way ? 1 : 0;

way = !way;


for (; i <= door; i++) {

if (!(i % 2)) {

if (way != two) {

printf("Love is open door"); stc = 1; break;

}

}

if (!(i % 3)) {

if (way != three) {

printf("Love is open door"); stc = 1; break;

}

}

way = !way;

}

if (stc == 0) {

for (int j = 2; j <= door; j++) { printf("%d\n", two); two = !two; }

}

system("pause");

return 0;

}


공개되어있는 테스트케이스는 정답 나오는데 왜 틀리는지 모르겠다. 제출할땐 언더바s 없애고 시스템퍼즈 없애고 제출했다.
어디 부분에서 틀렸길래 이러는지를 잘 모르겠음.