CF270A Fancy Fence
题目描述
Emuskald needs a fence around his farm, but he is too lazy to build it himself. So he purchased a fence-building robot.
He wants the fence to be a regular polygon. The robot builds the fence along a single path, but it can only make fence corners at a single angle $ a $ .
Will the robot be able to build the fence Emuskald wants? In other words, is there a regular polygon which angles are equal to $ a $ ?
输入格式
第一行输入一个整数t,表示有t组样例输入。
之后的t行,每行一个整数a,表示转动的角度。
输出格式
如果围得出正多边形,输出“YES”(不要定义)。否则,输出“NO”(同上)。
(输入均不超过int类型)
## 输入输出样例
##### 输入样例#1:
3 30
60
90
##### 输出样例#1:
NO
YES
YES
说明/提示
Emuskald想在他的农场周围造一圈栅栏,但是他太懒了,不想自己动手。于是,他买了一个栅栏机器人。
Emuskald想把栅栏围成正多边形。机器人每次造一个边,之后只能转动a°继续建造下一个边。
Emuskald能造出他想要的围栏吗?也就是说,有没有一种正多边形的每一个角都为a°。
第一组样例中,转动角度为30°,围不出正多边形。
第二组转动角度为60°,围出三角形。
第三组转动角度为90°,围出正方形。
感谢@PaulHunter 提供的翻译