Problem: https://www.codechef.com/PBK22020/problems/ITGUY21
DIFFICULTY:
EASY.
PROBLEM:
The chef is trying to solve some pattern problems, Chef wants your help to code it. Chef has one number K to form a new pattern. Help the chef to code this pattern problem.
Program:
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
int t;
cin>>t;
while(t--){
int k;
cin>>k;
long long arr[k];
arr[0]=0;
arr[1]=1;
for(int i=2; i<k;i++){
arr[i]=arr[i-1]+arr[i-2];
}
int j=1;
while(j<=k){
for(int i=0; i<j; i++){
cout<<arr[i];
}
j++;
cout<<endl;
}
}
}