#include<cstdio> #include<cmath> using namespace std; int main() { int angle,mark[200]={0}; for (int i=0;i<12;i++) { for (int j=0;j<60;j++) { angle=abs(j-(i+j/12))*6; if (angle>180) angle=360-angle; mark[angle]=1; } } int n; while (scanf("%d",&n)!=EOF) { if (mark[n]) printf("Y\n"); else printf("N\n"); } return 0; }
Friday, July 22, 2016
UVA 12531 Solution
Unknown
Studying at Shahjalal University of Science and Technology, Sylhet.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment