about summary refs log tree commit diff
path: root/others/volume1/002.pas
diff options
context:
space:
mode:
Diffstat (limited to 'others/volume1/002.pas')
-rw-r--r--others/volume1/002.pas21
1 files changed, 21 insertions, 0 deletions
diff --git a/others/volume1/002.pas b/others/volume1/002.pas
new file mode 100644
index 0000000..7732052
--- /dev/null
+++ b/others/volume1/002.pas
@@ -0,0 +1,21 @@
+uses fibonacci;
+
+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 fibonacci93[i] > m then
+      begin
+        writeln(i - 1, ' ', fibonacci93[i - 1]);
+        exit
+      end
+end.