Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program hmm;
- {$R-}
- const
- n = 2000;
- len = 10*n div 3;
- var
- i, j:Int32;
- q, x, a: Int32;
- tm: Int64;
- begin
- tm := GetTickCount();
- for j:=1 to n do
- begin
- q := 0;
- a := 2;
- for i:=len downto 1 do
- begin
- x := 10*a + q*i;
- a := x mod (2*i - 1);
- q := x div (2*i - 1);
- end;
- end;
- writeln('Used ' + ToStr(GetTickCount() - tm) + ' ms');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement