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

##05AB1E, (削除) 8 (削除ここまで) 7 bytes##

05AB1E, (削除) 8 (削除ここまで) 7 bytes

[DÉO_# ̈

Explanation

[ # infinite loop start
 DÉO # count odd numbers
 _ # push negative bool (turning 0->1, X->0)
 # # if true (no odd numbers exist), break out of loop and implicitly print
 ̈ # else, remove last element from list

Try it online

Previous 8 byte solution

vyÈiyˆëq

Explanation

v # for each y in input
 yÈi # if y is even
 yˆ # push y to global array
 ëq # else terminate program
 # implicitly print global array

Try it online

##05AB1E, (削除) 8 (削除ここまで) 7 bytes##

[DÉO_# ̈

Explanation

[ # infinite loop start
 DÉO # count odd numbers
 _ # push negative bool (turning 0->1, X->0)
 # # if true (no odd numbers exist), break out of loop and implicitly print
 ̈ # else, remove last element from list

Try it online

Previous 8 byte solution

vyÈiyˆëq

Explanation

v # for each y in input
 yÈi # if y is even
 yˆ # push y to global array
 ëq # else terminate program
 # implicitly print global array

Try it online

05AB1E, (削除) 8 (削除ここまで) 7 bytes

[DÉO_# ̈

Explanation

[ # infinite loop start
 DÉO # count odd numbers
 _ # push negative bool (turning 0->1, X->0)
 # # if true (no odd numbers exist), break out of loop and implicitly print
 ̈ # else, remove last element from list

Try it online

Previous 8 byte solution

vyÈiyˆëq

Explanation

v # for each y in input
 yÈi # if y is even
 yˆ # push y to global array
 ëq # else terminate program
 # implicitly print global array

Try it online

added 342 characters in body
Source Link
Emigna
  • 53.2k
  • 5
  • 44
  • 164

##05AB1E, 8(削除) 8 (削除ここまで) 7 bytes##

[DÉO_# ̈

Explanation

[ # infinite loop start
 DÉO # count odd numbers
 _ # push negative bool (turning 0->1, X->0)
 # # if true (no odd numbers exist), break out of loop and implicitly print
 ̈ # else, remove last element from list

Try it online

Previous 8 byte solution

vyÈiyˆëq

Explanation

v # for each y in input
 yÈi # if y is even
 yˆ # push y to global array
 ëq # else terminate program
 # implicitly print global array

Try it online

##05AB1E, 8 bytes##

vyÈiyˆëq

Explanation

v # for each y in input
 yÈi # if y is even
 yˆ # push y to global array
 ëq # else terminate program
 # implicitly print global array

Try it online

##05AB1E, (削除) 8 (削除ここまで) 7 bytes##

[DÉO_# ̈

Explanation

[ # infinite loop start
 DÉO # count odd numbers
 _ # push negative bool (turning 0->1, X->0)
 # # if true (no odd numbers exist), break out of loop and implicitly print
 ̈ # else, remove last element from list

Try it online

Previous 8 byte solution

vyÈiyˆëq

Explanation

v # for each y in input
 yÈi # if y is even
 yˆ # push y to global array
 ëq # else terminate program
 # implicitly print global array

Try it online

Source Link
Emigna
  • 53.2k
  • 5
  • 44
  • 164

##05AB1E, 8 bytes##

vyÈiyˆëq

Explanation

v # for each y in input
 yÈi # if y is even
 yˆ # push y to global array
 ëq # else terminate program
 # implicitly print global array

Try it online

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