/Chialaydu - Chia lấy dư

<Problem>

http://ntucoder.net/Problem/Details/5572
              USES CRT,MATH;
        type    Arr=array[0..1000000] of boolean;
        var     n,k,t,i,res:longint;
                NT:Arr;
                begin
                    fillchar(NT,sizeof(NT),true);
                    readln(n,k);
                    for i:=1 to n do begin
                        read(t);
                        if NT[t mod k]=true then begin
                            NT[t mod k]:=false;
                            inc(res);
                        end;
                    end;
                    writeln(res);
                    readln
                end.