送你个pascal,
var
i,s:integer;
begin
for i:=100 to 999 do
if (i-2) mod 3=0 then s:=s+i;
writeln(s);
end.
答案是164850.
学弟or学妹.