Spiral matrix - MarisaOJ: Marisa Online Judge

Spiral matrix

Time limit: 1000 ms
Memory limit: 256 MB
Print a spiral matrix of size n rows and m columns. For example, with a matrix of 5 rows and 6 columns: 123456181920212271728293023816272625249151413121110 ### Input - A single line containing two integers n and m. ### Output - Print the spiral matrix. ### Constraints - 1≤n,m≤100. ### Sample test 33 Output: 123894765