地址:http://codeforces.com/contest/270/problem/A
用多边形外角来做,外角和为360度,然后比对边数
1 #include <iostream> 2 using namespace std; 3 4 int t,a; 5 6 int main() 7 { 8 ios::sync_with_stdio(false); 9 cin>>t; 10 while(t--) 11 { 12 cin>>a; 13 int n; 14 n=360/(180-a); 15 int sum; 16 sum=(n-2)*180; 17 if(n==sum/a) cout<<"YES"<<endl; 18 else cout<<"NO"<<endl; 19 } 20 return 0; 21 }