Thứ Tư, 27 tháng 4, 2022

UOCNT Pascal

var n,dem:int64;
procedure nhap;
begin
    readln(n);
end;

procedure giai;
var i,d:longint;
begin
    d:=1;
    i:=2;
    while i<=trunc(sqrt(n)) do
    begin
        if n mod i = 0 then inc(d);
        while n mod i=0 do
            n:=n div i;
        inc(i);
    end;
    if n>1 then inc(d);
    write(d);
end;

begin
    assign(input,'uocnt.inp');reset(input);
    assign(output,'uocnt.out');rewrite(output);
    nhap;
    xuli;
    xuat;
end.

Không có nhận xét nào:

Đăng nhận xét

Lưu ý: Chỉ thành viên của blog này mới được đăng nhận xét.