爪哇8,140个 131字节
m->{String r="";for(int a=m.length,b=m[0].length,i=a+a,j;i-->0;r+="\n")for(j=b+b;j-->0;)r+=m[i<a?i:a+a+~i][j<b?j:b+b+~j];return r;}
说明:
在线尝试。
m->{ // Method with integer-matrix parameter and String return-type
String r=""; // Result-String, starting empty
for(int a=m.length, // Amount of rows of the input-matrix
b=m[0].length, // Amount of columns of the input-matrix
i=a+a,j; // Index integers
i-->0; // Loop over double the rows
r+="\n") // After every iteration: append a new-line to the result
for(j=b+b;j-->0;) // Inner loop over double the columns
r+= // Append the result with:
m[i<a? // If `i` is smaller than the amount of rows
i // Use `i` as index in the input-matrix
: // Else:
a+a+~i] // Use `a+a+i-1` as index instead
[j<b? // If `j` is smaller than the amount of columns
j // Use `j` as index in the input-matrix
: // Else:
b+b+~j]; // Use `b+b+j-1` as index instead
return r;} // Return the result-String