M - Fancy Fence

Insert picture description here
Insert picture description here

#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
    
    
    int t,a;
   cin>>t;
   while(t--)
   {
    
    
   	cin>>a;
    if(360%(180-a)==0)
    cout<<"YES"<<endl;
	else
	cout<<"NO"<<endl;
   }
    return 0;
}

Need to know: the sum of the exterior angles of a polygon is 360°, and the interior angle of a regular polygon cannot be less than 30°

Guess you like

Origin blog.csdn.net/weixin_51713993/article/details/114239018