Sunday, February 1, 2015

Solution of 270A. Fancy Fence (CodeForces)

#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
using namespace std;
#define pf printf
#define sf scanf
typedef long long ll;

int main()
{
    int test, a;
    sf("%d", &test);
    while(test--)
    {
        sf("%d", &a);
        if( 360 % (180-a) ==0)
        {
            pf("YES\n");
        }
        else
        {
            pf("NO\n");
        }
    }
}

No comments:

Post a Comment

Compare equality of two string in C

#include <stdio.h> #include<string.h> int main() {     char* country = "Bangladesh";     char* country2;     ...