CF40A.Find Color
普及-
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Not so long ago as a result of combat operations the main Berland place of interest — the magic clock — was damaged. The cannon's balls made several holes in the clock, that's why the residents are concerned about the repair. The magic clock can be represented as an infinite Cartesian plane, where the origin corresponds to the clock center. The clock was painted two colors as is shown in the picture:

The picture shows only the central part of the clock. This coloring naturally extends to infinity.
The balls can be taken to be points on the plane. Your task is to find the color of the area, damaged by the given ball.
All the points located on the border of one of the areas have to be considered painted black.
不久之前,由于战斗行动,贝尔兰最主要的景点——魔法钟——遭到破坏。炮弹在钟面上留下了多个弹孔,因此当地居民十分关心修复工作。该魔法钟可被表示为一个无限的笛卡尔平面,其中原点对应钟面中心。钟面按如下图所示方式以两种颜色涂绘:

图中仅显示了钟面的中心部分,这种着色方式自然地向整个平面无限延展。
炮弹可视为平面上的点。你的任务是确定给定炮弹所击中的区域的颜色。
所有位于任一区域边界的点均视为黑色。
输入格式
The first and single line contains two integers x and y — the coordinates of the hole made in the clock by the ball. Each of the numbers x and y has an absolute value that does not exceed 1000.
第一行且唯一一行包含两个整数 x 和 y —— 表示球在钟面上击出的孔的坐标。每个数 x 和 y 的绝对值均不超过 1000。
输出格式
Find the required color.
All the points between which and the origin of coordinates the distance is integral-value are painted black.
找出所需的颜色。
所有到坐标原点的距离为整数值的点均被涂成黑色。
输入输出样例
输入#1
-2 1
输出#1
white
输入#2
2 1
输出#2
black
输入#3
4 3
输出#3
black
输入解题思路,AI测评打分。不知道怎么写?