The Fibonacci sequence F is a series whose elements are numbers starting with and , and subsequent Fibonacci numbers are defined recursively: . The first 20 Fibonacci numbers are:
Given two indices n and m, write a program to return the least common Fibonacci number, , which is defined as the smallest Fibonacci number divisible by both and . For example,, which is , since and both divide .
Since. the value of may become large even if the values of n and m are relatively small, please output a vector containing the number of digits and the last 6 digits of . Therefore, in the example above the output of , which has 4 digits, should be .

Solution Stats

32 Solutions

6 Solvers

Last Solution submitted on Jan 31, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...