Advertisement
pablo7890

ogrodzenie

Sep 19th, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void check(int a)
  6. {
  7.     bool found = false;
  8.     for (int i=1; i<32000; ++i)
  9.     {
  10.         if (a == 180-360/i)
  11.         {
  12.             cout << "TAK" << endl;
  13.             found = true;
  14.             break;
  15.         }
  16.     }
  17.     if (found == false)
  18.     {
  19.         cout << "NIE" << endl;
  20.     }
  21. }
  22.  
  23. int main ()
  24. {
  25.     int n;
  26.     cin >> n;
  27.     for (int i=0; i<n; ++i)
  28.     {
  29.         int a;
  30.         cin >> a;
  31.         check(a);
  32.     }
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement