


The first line contains an integer 'T' which denotes the number of test cases or queries to be run.
The first line of each test case contains a single integer ‘N’ denoting the given number.
For each test case, print a single line containing the encrypted form of the number.
The output of each test case will be printed in a separate line.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 5
1 <= N <= 5000
Time Limit: 1 sec
Can you do this in constant time and space?
The idea here is very simple as you can see that we are simply applying operations like multiply and divide and alternatively we are adding and subtracting the result. So we just have to find the result of every three numbers in every iteration and we can simply do the required operations alternatively.
The idea here is to divide the problem in the form of ‘4’ and we can then simply find the result for ‘0’, ‘1’, ‘2’, ‘3’ elements as after every ‘4’ times the same operators are repeated.
Co-Prime
Fizzbuzz Problem
Print Fibonacci Series
Print Fibonacci Series
Print Fibonacci Series
Print Fibonacci Series
Print Fibonacci Series
Print Fibonacci Series
First Digit One
Special Digit Numbers