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, (削除) 3518 3189 (削除ここまで) 2692

Java, (削除) 3518 3189 (削除ここまで) 2692

A simple loop that prints even characters, then odds. I tried a few things to optimize earlier ASCIIs, but most ended up making it longer overall, and ended up with a higher score.

void A(){for(char A=31;A!=126;System.out.print(A+=2))A=A==125?30:A;}

Output is:

!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{} "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~

Edit: Misunderstood the scoring at first. After flipping it to odd first, then even, it scores a lot better.

#Java, (削除) 3518 3189 (削除ここまで) 2692

A simple loop that prints even characters, then odds. I tried a few things to optimize earlier ASCIIs, but most ended up making it longer overall, and ended up with a higher score.

void A(){for(char A=31;A!=126;System.out.print(A+=2))A=A==125?30:A;}

Output is:

!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{} "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~

Edit: Misunderstood the scoring at first. After flipping it to odd first, then even, it scores a lot better.

Java, (削除) 3518 3189 (削除ここまで) 2692

A simple loop that prints even characters, then odds. I tried a few things to optimize earlier ASCIIs, but most ended up making it longer overall, and ended up with a higher score.

void A(){for(char A=31;A!=126;System.out.print(A+=2))A=A==125?30:A;}

Output is:

!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{} "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~

Edit: Misunderstood the scoring at first. After flipping it to odd first, then even, it scores a lot better.

added 1 character in body
Source Link
Geobits
  • 19.7k
  • 4
  • 56
  • 125

#Java, (削除) 3518 3189 (削除ここまで) 28232692

A simple loop that prints even characters, then odds. I tried a few things to optimize earlier ASCIIs, but most ended up making it longer overall, and ended up with a higher score.

void A(){for(char A=29;AA=31;A!=126;System.out.print(A+=2))A=A>124A=A==125?30:A;}

Output is:

!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{} "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~

Edit: Misunderstood the scoring at first. After flipping it to odd first, then even, it scores a lot better.

#Java, (削除) 3518 3189 (削除ここまで) 2823

A simple loop that prints even characters, then odds. I tried a few things to optimize earlier ASCIIs, but most ended up making it longer overall, and ended up with a higher score.

void A(){for(char A=29;A!=126;System.out.print(A+=2))A=A>124?30:A;}

Output is:

!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{} "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~

Edit: Misunderstood the scoring at first. After flipping it to odd first, then even, it scores a lot better.

#Java, (削除) 3518 3189 (削除ここまで) 2692

A simple loop that prints even characters, then odds. I tried a few things to optimize earlier ASCIIs, but most ended up making it longer overall, and ended up with a higher score.

void A(){for(char A=31;A!=126;System.out.print(A+=2))A=A==125?30:A;}

Output is:

!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{} "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~

Edit: Misunderstood the scoring at first. After flipping it to odd first, then even, it scores a lot better.

better score
Source Link
Geobits
  • 19.7k
  • 4
  • 56
  • 125

#Java, (削除) 3518 3189 (削除ここまで) 31892823

A simple loop that prints even characters, then odds. I tried a few things to optimize earlier ASCIIs, but most ended up making it longer overall, and ended up with a higher score.

void BA(){for(char A=30;AA=29;A!=125;System=126;System.out.print(A+=2))A=A>125A=A>124?3130:A;}

Output is:

 "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{} "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~

Edit:Edit: Misunderstood the scoring, let me see what else I can do here. at first. After flipping it to odd first, then even, it scores a lot better.

#Java, (削除) 3518 (削除ここまで) 3189

A simple loop that prints even characters, then odds. I tried a few things to optimize earlier ASCIIs, but most ended up making it longer overall, and ended up with a higher score.

void B(){for(char A=30;A!=125;System.out.print(A+=2))A=A>125?31:A;}

Output is:

 "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}

Edit: Misunderstood the scoring, let me see what else I can do here...

#Java, (削除) 3518 3189 (削除ここまで) 2823

A simple loop that prints even characters, then odds. I tried a few things to optimize earlier ASCIIs, but most ended up making it longer overall, and ended up with a higher score.

void A(){for(char A=29;A!=126;System.out.print(A+=2))A=A>124?30:A;}

Output is:

!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{} "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~

Edit: Misunderstood the scoring at first. After flipping it to odd first, then even, it scores a lot better.

Source Link
Geobits
  • 19.7k
  • 4
  • 56
  • 125
Loading

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