Type: Default 1000ms 256MiB

素数判定

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

Description

对于表达式n^2+n+41,当n在(x,y)范围内取整数值时(包括x,y)(-39<=x<y<=50),判定该表达式的值是否都为素数。

Format

Input

输入数据有多组,每组占一行,由两个整数x,y组成,当x=0,y=0时,表示输入结束,该行不做处理。

Output

对于每个给定范围内的取值,如果表达式的值都为素数,则输出"OK",否则请输出“Sorry”,每组输出占一行。

Samples

0 1
0 0
OK

Limitation

1s, 1024KiB for each test case.

搜索and数论

Not Claimed
Status
Done
Problem
8
Open Since
2024-11-4 0:00
Deadline
2024-11-11 23:59
Extension
144 hour(s)