Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- unsigned int tab[100000];
- unsigned int a;
- cin >> a;
- if (a <= 100000 && a > 0)
- {
- for (int i = 0; i < a; i++)
- {
- cin >> tab[i];
- if (tab[i] == 1)
- tab[i] = 0;
- else
- {
- if (tab[i] == 2 || tab[i] == 3 || tab[i] == 5)
- tab[i] = 1;
- else
- {
- if ((tab[i] % 2 != 0) && (tab[i] % 3 != 0) && (tab[i] % 5 != 0))
- tab[i] = 1;
- else tab[i] = 0;
- }
- }
- }
- for (int j = 0; j < a; j++)
- {
- if (tab[j] == 1)
- cout << "TAK"<<endl;
- else cout << "NIE" << endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement