You are viewing a single comment's thread. Return to all comments →
I did it this way
int main(){ char* s = (char *)malloc(10240 * sizeof(char)); scanf("%s",s); int len = strlen(s); int columns = ceil(sqrt(len)); for(int i = 0; i < columns; i++) { for(int j = i; j < len; j += columns) { printf("%c", s[j]); } printf(" "); } return 0; }
all of the test cases take 0s
Seems like cookies are disabled on this browser, please enable them to open this website
Encryption
You are viewing a single comment's thread. Return to all comments →
I did it this way
all of the test cases take 0s