#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios::sync_with_stdio(false);
cin.tie(0);
int t;
cin>>t;
while(t--){
int k;
cin>>k;
int nm=11;
for(int i=0;i<k;i++){
int tempn=nm;
for(int j=0;j<k;j++){
cout<<tempn;
tempn+=10; }
nm++;
cout<<"\n";
}
}
return 0;
}
produce same result …but still WA… why?
I wonder if a day will come when everyone will know how to format code before posting.
1 Like
Yeah way better now, btw 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
2 Likes