Pascal :
var n,i,j,m,k,x,y,z,s:longint; BEGIN read(n); for i:=2 to n do begin for j:=2 to 10000 do if i mod j=0 then begin inc(m,j);break; end; end; if m<>0 then write(m) else write('7'); END.
By signing up a 算道OJ universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 算道OJ universal account