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

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.