Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program complex3;
- var n,i,x,cek,faktor:0..1000000;
- begin
- readln(n);
- for i:=1 to n do
- begin
- readln(x);
- faktor:=0;
- cek:=2;
- if (x=1) or (x=2) or (x=4) then
- begin
- writeln('YA');
- end
- else
- begin
- while (cek<=trunc(x/2)+1) do
- begin
- if(x mod cek=0) then
- begin
- faktor:=faktor+1;
- if (faktor>2) then
- begin
- writeln('BUKAN');
- break;
- end;
- end
- else
- begin
- if (cek=trunc(x/2)+1) then
- begin
- writeln('YA');
- break;
- end;
- end;
- cek:=cek+1;
- end;
- end;
- end;
- readln;
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement