Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

##Java, 213 bytes

Java, 213 bytes

void p(int n){int i=1,s=1,f,c;while(i>0){f=(n+1-i)*2;System.out.printf("%"+f+"s","");c=65;for(;c<64+i;)System.out.printf("%c ",c++);for(;c>64;)System.out.printf("%c ",c--);System.out.println();if(i==n)s=-1;i+=s;}}

Ungolfed:

void p(int n) {
 int i = 1, s = 1, f, c;
 while (i > 0) {
 f = (n + 1 - i) * 2;
 System.out.printf("%" + f + "s", "");
 c = 65;
 for (; c < 64 + i; ) System.out.printf("%c ", c++);
 for (; c > 64; ) System.out.printf("%c ", c--);
 System.out.println();
 if (i == n) s = -1;
 i += s;
 }
}

##Java, 213 bytes

void p(int n){int i=1,s=1,f,c;while(i>0){f=(n+1-i)*2;System.out.printf("%"+f+"s","");c=65;for(;c<64+i;)System.out.printf("%c ",c++);for(;c>64;)System.out.printf("%c ",c--);System.out.println();if(i==n)s=-1;i+=s;}}

Ungolfed:

void p(int n) {
 int i = 1, s = 1, f, c;
 while (i > 0) {
 f = (n + 1 - i) * 2;
 System.out.printf("%" + f + "s", "");
 c = 65;
 for (; c < 64 + i; ) System.out.printf("%c ", c++);
 for (; c > 64; ) System.out.printf("%c ", c--);
 System.out.println();
 if (i == n) s = -1;
 i += s;
 }
}

Java, 213 bytes

void p(int n){int i=1,s=1,f,c;while(i>0){f=(n+1-i)*2;System.out.printf("%"+f+"s","");c=65;for(;c<64+i;)System.out.printf("%c ",c++);for(;c>64;)System.out.printf("%c ",c--);System.out.println();if(i==n)s=-1;i+=s;}}

Ungolfed:

void p(int n) {
 int i = 1, s = 1, f, c;
 while (i > 0) {
 f = (n + 1 - i) * 2;
 System.out.printf("%" + f + "s", "");
 c = 65;
 for (; c < 64 + i; ) System.out.printf("%c ", c++);
 for (; c > 64; ) System.out.printf("%c ", c--);
 System.out.println();
 if (i == n) s = -1;
 i += s;
 }
}
added 1 character in body
Source Link
Yevgen
  • 153
  • 4

#Java##Java, 213 bytes

void p(int n){int i=1,s=1,f,c;while(i>0){f=(n+1-i)*2;System.out.printf("%"+f+"s","");c=65;for(;c<64+i;)System.out.printf("%c ",c++);for(;c>64;)System.out.printf("%c ",c--);System.out.println();if(i==n)s=-1;i+=s;}}

Ungolfed:

void p(int n) {
 int i = 1, s = 1, f, c;
 while (i > 0) {
 f = (n + 1 - i) * 2;
 System.out.printf("%" + f + "s", "");
 c = 65;
 for (; c < 64 + i; ) System.out.printf("%c ", c++);
 for (; c > 64; ) System.out.printf("%c ", c--);
 System.out.println();
 if (i == n) s = -1;
 i += s;
 }
}

#Java 213 bytes

void p(int n){int i=1,s=1,f,c;while(i>0){f=(n+1-i)*2;System.out.printf("%"+f+"s","");c=65;for(;c<64+i;)System.out.printf("%c ",c++);for(;c>64;)System.out.printf("%c ",c--);System.out.println();if(i==n)s=-1;i+=s;}}

Ungolfed:

void p(int n) {
 int i = 1, s = 1, f, c;
 while (i > 0) {
 f = (n + 1 - i) * 2;
 System.out.printf("%" + f + "s", "");
 c = 65;
 for (; c < 64 + i; ) System.out.printf("%c ", c++);
 for (; c > 64; ) System.out.printf("%c ", c--);
 System.out.println();
 if (i == n) s = -1;
 i += s;
 }
}

##Java, 213 bytes

void p(int n){int i=1,s=1,f,c;while(i>0){f=(n+1-i)*2;System.out.printf("%"+f+"s","");c=65;for(;c<64+i;)System.out.printf("%c ",c++);for(;c>64;)System.out.printf("%c ",c--);System.out.println();if(i==n)s=-1;i+=s;}}

Ungolfed:

void p(int n) {
 int i = 1, s = 1, f, c;
 while (i > 0) {
 f = (n + 1 - i) * 2;
 System.out.printf("%" + f + "s", "");
 c = 65;
 for (; c < 64 + i; ) System.out.printf("%c ", c++);
 for (; c > 64; ) System.out.printf("%c ", c--);
 System.out.println();
 if (i == n) s = -1;
 i += s;
 }
}
Source Link
Yevgen
  • 153
  • 4

#Java 213 bytes

void p(int n){int i=1,s=1,f,c;while(i>0){f=(n+1-i)*2;System.out.printf("%"+f+"s","");c=65;for(;c<64+i;)System.out.printf("%c ",c++);for(;c>64;)System.out.printf("%c ",c--);System.out.println();if(i==n)s=-1;i+=s;}}

Ungolfed:

void p(int n) {
 int i = 1, s = 1, f, c;
 while (i > 0) {
 f = (n + 1 - i) * 2;
 System.out.printf("%" + f + "s", "");
 c = 65;
 for (; c < 64 + i; ) System.out.printf("%c ", c++);
 for (; c > 64; ) System.out.printf("%c ", c--);
 System.out.println();
 if (i == n) s = -1;
 i += s;
 }
}

AltStyle によって変換されたページ (->オリジナル) /