SpyrographsProblem code: CE04 |
A Spyrograph is the output of a 2 D array in spiral form as shown below,from the given example below WAP to find the spyrograph of a given 2D array.
Input
The first line will consist of the total number of test cases T(1<=T<=10). The next T lines will consist of one number on each line. These are the elements of the 2D array
Output
For each test case print out each element of the spyrograph.
Example
Input:
1
156
25
3
4
54
62
7
82
9
210
311
142
143
14
15
45
Output:
624
100
12
16
328
568
0
60
56
572
36
216
248
28
1244
840
| Author: | cerebration |
| Date Added: | 22-03-2010 |
| Time Limit: | 1 sec |
| Source Limit: | 50000 Bytes |
| Languages: | BF, CLOJ, CPP 4.3.2, F#, GO, ICK, JS, PERL6, PRLG, PYTH 3.1.2, TEXT, WSPC |
Comments

Fetching successful submissions

@Admin:.. Q nt so clear!!
@Admin:.. Q nt so clear!!
"The first line will consist
"The first line will consist of the total number of test cases T(1<=T<=10). The next T lines will consist of one number on each line."
On the first line there is a 1, which means there is only one test case or there is only one line, but as i can see there are 16 lines. Please correct this.
considering that there are 16
considering that there are 16 lines, I guess that it is a 4x4 matrix which is taken as input for each test case, still dont understand the output
If anyone can figure out what
If anyone can figure out what the relation between the input and output is please explain it here
@admin : the output seems
@admin :
the output seems to be incorrect for 2 numbers
for 89 and 45 as inputs ....
hey thapan how to get the end
hey thapan how to get the end of the input
solved it anyhow :D
solved it anyhow :D
@tmadda..explain the
@tmadda..explain the question!!!
Can someone pls give some
Can someone pls give some hint as to what needs to be done in this question?
Again, the sample output is
Again, the sample output is bullshit.
Print the 4X4 matrix in spiral order to get your solution accepted.
@manohar tried it..please
@manohar tried it..please post a sample input and output
SITZ plz can u tell wheter
SITZ plz can u tell wheter the octal program test case is correct or not
@Punjabi : NO !! Its
@Punjabi : NO !! Its absolutely wrong ... Just do what is given in the statement of problem...
nothing else . . :)
@Punjabi what is the size of
@Punjabi what is the size of input matrix... and how we have to output them...
please give a sample test input/output data . . .
@Manohar prabhu Even printing
@Manohar prabhu
Even printing 4x4 mat in spiral form isnt wrking. can u clear what exactly is meant by spiral ?
Is first line the number of
Is first line the number of testcases? And, is each matrix a 4 X 4 one?
what are the correct test
what are the correct test cases and how do we end our input????
Admins where r u????
@rohan Plz reply
@rohan
Plz reply admin....correct the test data for bouncy no and spyrograph.
thanx
The first line is the number
The first line is the number of 4x4 matrix youll need to enter
The next lines are the elements of the matrix entered in Row major order.
Also the output is encoded as with the previous questions,please program accordingly.
can you plz let me know what
can you plz let me know what do you mean by output is encoded???
output is wrong!!! 180 is
output is wrong!!!
180 is there instead of 0 in output
How careless...
How careless...
abe kya natak laga
abe kya natak laga rakha
suno yaar tumhe pahele batana chahiye tha ya email karna chahiye tha
this is not fair with us.
I spent my whole day for solving these problems now you are saying you haven't registred.
sending information of this much value throungh comment is not good.
please be fair in judging.
:(
:(
:(