Its all about magic!
Practice
3.9 (15 votes)
Ad Hoc
Basic programming
Open
Approved
Easy
Mathamatics
Problem
67% Success 8211 Attempts 20 Points 3s Time Limit 256MB Memory 1024 KB Max Code

Recently Oz has found a magical string consisting of single digit "1". After experimenting on the string, Oz found a weird magical property of the string that is whenever he touches the string then each digit "1" of string changed to digit "0" and each digit "0" of string changed to "01". Oz found this property interesting and immediately asked a question to RK : "How many 1's and 0's will be in the magical string if he touches the string M times ?"

Input :

The first line contains the number of test cases T . Each test case consists of a positive integer - M .

Output :

For each test case output two space-separated integers, number of 1's and number of 0's in the magical string if Oz touches the string M times.

Constraints :

1<= T <=20

1<= M <=90

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
17 votes
Tags:
EasyBasic MathMathematicsMathematics
Points:20
Points:20
26 votes
Tags:
Data StructuresBasic MathAlgorithmsMath BasicMath