OJ-Problems-Source/HDOJ/2012_autoAC.cpp
2016-08-19 16:52:35 +08:00

21 lines
570 B
C++

int main(void)
{
int m, n;
int x[] =
{
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1
};
while (scanf("%d%d", &m, &n), m || n)
{
for (m += 39, n += 39; x[m] && m <= n ; m++);
puts(m > n ? "OK" : "Sorry");
}
return 0;
}