ITGUY35 - Editorial

Problem: Contest Page | CodeChef

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; 

int main() 
{ 
	ios_base::sync_with_stdio(false);
   	cin.tie(NULL);
   	cout.tie(NULL);
   	int t,n;
   	cin>>t;
   	while(t--){
   		cin>>n;
   		for(int i=0;i<n;i++){
   			for(int j=0;j<n;j++)cout<<j+1<<i+1;
   			cout<<"\n";
   		}
   	}
} 

Whats wrong in my code ?

https://www.codechef.com/viewsolution/40867965

on which test it is faling and what should be output ?

Would you mind formatting your mangled code? Also what in the world has admin to do with this, why’re you tagging him? :rofl: :rofl: :rofl:

1 Like

I am asking here for the help
If your applicability is not to help plz don’t commen . I am newbie and i also dont know the norms which you people follows . Whatever you think keep it in your mind don’t put it here .
Rather than wasting time in commenting it would be better if you find the fault and tell me . Isn’t it ?

As you said i removed my “mangled” code and posted the link tell what’s wrong if you are able too .

Your logic is wrong.

TEST_CASE
1
10
YOUR_OUTPUT
112131415161718191101
122232425262728292102
132333435363738393103
142434445464748494104
152535455565758595105
162636465666768696106
172737475767778797107
182838485868788898108
192939495969798999109
2030405060708090100110

CORRECT_OUTPUT
112131415161718191101
122232425262728292102
132333435363738393103
142434445464748494104
152535455565758595105
162636465666768696106
172737475767778797107
182838485868788898108
192939495969798999109
1102103104105106107108109101010

Aight, now let me clear up a few things. Firstly it seems like you don’t know the full form of admin. FYKI it stands for administrator and your doubt has nothing to do with administration stuff. Secondly, its a very basic etiquette of this forum to post formatted code/code link, no one would like to see a bunch of unreadable gibberish on their screens. I just pointed out these 2 totally valid points and you don’t seem to agree, nvm (I don’t know why people get infuriated on when they are pointed out for doing something absurd)

1 Like

Thanks bro .
as I said I don’t about the norms which are being followed here as I am newbie .
A big sorry for the offensive words I used .
and the reason behind getting infuriated because it demotivates .

1 Like

Sure, I highly appreciate your guts to apologize :slightly_smiling_face:.

1 Like