摘要: procedure euler; var i,j:longint; begin phi[1]:=1; for i:=2 to n do begin if not mark[i] then begin inc(tot); p[tot]:=i; phi[i]:=i-1; end; for j:=1 to n do begin if i*p[j]>n then break; mark[i*p[j]]:=true; if i mod p[j]=0 then begin phi[i*p[j]]:=phi[i]*p[j]; break; 阅读全文
posted @ 2016-03-14 15:29 z1j1n1 阅读(181) 评论(0) 推荐(0) 编辑