General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
112599418 Practice:
rajutsav1234
270A - 21 C++17 (GCC 7-32) Wrong answer on test 1 0 ms 4 KB 2021-04-11 07:42:32 2021-04-11 07:42:32
→ Source
/*
Submitted by--
Utsav Raj
MNNIT Allahabad
*/
#include <bits/stdc++.h>   
using namespace std;
 
#define lli                   long long int
#define ulli                  unsigned long long int
#define fab(i,a,b)            for(long long int i=(a);i<(b);i++)
#define fabr(i,a,b)           for(long long int i=(a);i<=(b);i++)
#define fba(i,a,b)            for(long long int i=(b);i>=(a);i--)
#define pb                    push_back
#define eb                    emplace_back
#define mp                    make_pair
#define itoc(c)               ((char)(((int)'0')+c))
#define alt(v)                v.begin(),v.end()
#define ralt(v)               v.rbegin(),v.rend()
#define mid(s,e)              (s+(e-s)/2)
#define vi                    vector<int>
#define vvi                   vector< vector<int> >
#define endl                  '\n'

const lli MOD = 1e9 + 7;
lli temp,test=1;

void testcases() {
    lli n;
    cin>>n;
    if((n>=60)&&(n<180))
    {
        double x=(((double)2)/(1-(((double)n)/((double)180))));//calculate no. of sides of polygon
        if(abs(x-ceil(x))<(1e-6))//check if x is an integer or not
        {
            cout<<"YES"<<endl;
        }
        else
        {
            cout<<"NO"<<endl;
        }
    }
    else
    {
        cout<<"NO"<<endl;
    }
}   
 
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    /* code */ 
    int t; 
    cin >> t;
    while(t--) { testcases(); }
    /* end code */
    return 0;
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details