about summary refs log tree commit diff
path: root/others/volume1/002.pas
blob: 7cbdd502b27c778ac184a97b6112be802f9b1610 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
uses clib;

var
  m: int64;
  i: byte;

begin
  readln(m);
  if m <= 2 then
    begin
      writeln('1 1');
      exit
    end;

  for i := 3 to 88 do
    if fibonacci[i] > m then
      begin
        writeln(i - 1, ' ', fibonacci[i - 1]);
        exit
      end
end.