Topic: http: //codeforces.com/contest/270/problem/A
Input angle, determines whether the configuration of a regular polygon
Thinking: n-gon satisfied satisfies angle: angle = (n-2) * 180 / n
#include <iostream> using namespace std; int main() { int t; cin>>t; while (t--) { int n; cin>>n; if(360%(180-n)) cout<<"NO"<<endl; else cout <<"YES"<<endl; } }
Reproduced in: https: //www.cnblogs.com/danielqiu/archive/2013/02/02/2890268.html