ITGUY58 - Editorial

Problem: Contest Page | CodeChef

DIFFICULTY:

EASY.

PROBLEM:

The chef is trying to decode 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;
 
int main()
 {
	int t;
	cin>>t;
	while(t--){
		int n,k=1;
		cin>>n;
		for(int i=n;i>=1;i--){
			for(int j=1;j<=i;j++){
				cout<<k++;
			}
			cout<<endl;
		}
	}
} 
1 Like

Great job bhai you are revising the hole basic methods to solve a problem.
Just keep it up. This contest is i think best for placement point of view where they put the problem of pattern and many more.
Thanks dude.

1 Like

Stay tuned, On 4th Jan push_back(patterns) is waiting for you.

1 Like

Thanks dude :grinning:

1 Like