Question bank › Math
Dsa Math Medium

Consecutive Fibonacci Products

You are given an integer K. Your task is to find the product of the first K Fibonacci numbers (starting from the first Fibonacci number F(1) = 1) modulo 10^9 + 7. If K is zero, the output should be 1. Read an integer K from input and print the result. Input Format: - A single integer K (0 <= K <= 50). Output Format: - A single integer: the product of the first K Fibonacci numbers modulo 10^9 + 7. Example: Input: 5 Output: 120

Key concepts

mathfibonacciproduct

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.