← Back to topics
Topic

Tajna

D
Diabolic
I killed my self trying to pass the tests, but I got wrong results for all of the test. I am 100% that my code is correct.
Here is the code:
http://www.z-trening.com/new/www/html/submit.php?submit=7100040663&subm_code=1

Thanks in advance.
D
Diabolic
any admins to help me, please? I want to learn what is the problem, so I can skip it in the future.

Thanks in advance.
b
boris4
try to put cout << endl; at the end of your output.
D
Diabolic
I tried that also, but still nothing. Any other tips, please?
b
boris4
if you put << endl at the end of your output, you get first 3 cases correct, right ?

So something is wrong with your code.
D
Diabolic
No, if I put <<endl, also I got all wrong results.
b
boris4
not << endl there...

after you print all you need then if you put << endl

so
       
for(i=0;i<n;i++)
for(j=0;j<n*m;j=j+n)
cout << a[ j+i ];
cout << endl;
D
Diabolic
Lol, now I see where cout<<endl should be. And how can you see my code? Can only admins see my code ? Are u admin?
A
Al3kSaNdaR
Everyone who have solved some task can see other users solutions for the same task. ;)
D
Diabolic
Ohh. Thanks Al3kSaNdaR. Could somebody compare my result with yours please? And see where my error is. I really couldn't see why I fail on 3 tests.

Thanks in advance.
D
Diabolic
Now, I fail on 1 test. Could some admin check it plz :D