Skip to main content
deleted 205 characters in body
Source Link
Makonede
  • 6.6k
  • 20
  • 49

05AB1E, 4 bytes

All of the following programs work:

ÅTθQ
ÅTI¢
ÅTIå
ÅTs¢
ÅTså
ÅT¹¢
ÅT¹å

Try eachTry and every singleevery onesingle ofone theseof programsthese online!programs online!

ÅT is all triangular numbers \$≤\$ implicit input, θ is last element (a[-1]), Q is equality (a==b), I and ¹ are input (input()), ¢ is occurrences (a.count(b)), and å is membership (b in a).

05AB1E, 4 bytes

All of the following programs work:

ÅTθQ
ÅTI¢
ÅTIå
ÅTs¢
ÅTså
ÅT¹¢
ÅT¹å

Try each and every single one of these programs online!

ÅT is all triangular numbers \$≤\$ implicit input, θ is last element (a[-1]), Q is equality (a==b), I and ¹ are input (input()), ¢ is occurrences (a.count(b)), and å is membership (b in a).

05AB1E, 4 bytes

All of the following programs work:

ÅTθQ
ÅTI¢
ÅTIå
ÅTs¢
ÅTså
ÅT¹¢
ÅT¹å

Try every single one of these programs online!

ÅT is all triangular numbers \$≤\$ implicit input, θ is last element (a[-1]), Q is equality (a==b), I and ¹ are input (input()), ¢ is occurrences (a.count(b)), and å is membership (b in a).

deleted 495 characters in body; deleted 47 characters in body
Source Link
Makonede
  • 6.6k
  • 20
  • 49

05AB1E, 4 bytes

Ties Jonathan Allan's Jelly answer, Cowabunghole's 05AB1E answer, Stephen's cQuents answer, rev's 05AB1E answer, PkmnQ's cQuents answer, and Razetime's Husk answer for #1.

All of the following programs work:

ÅTθ-
ÅTθQ
ÅT-θ
ÅT-¤
ÅTI¢
ÅTIå
ÅTs¢
ÅTså
ÅT¹¢
ÅT¹å

Try each and every single one of these programs online!

ÅT is all triangular numbers \$≤\$ implicit input, θ and ¤ areis last element (a[-1]), - is subtraction, Q is equality (a==b), I and ¹ are input (input()), ¢ is occurrences (a.count(b)), and å is membership (b in a).

05AB1E, 4 bytes

Ties Jonathan Allan's Jelly answer, Cowabunghole's 05AB1E answer, Stephen's cQuents answer, rev's 05AB1E answer, PkmnQ's cQuents answer, and Razetime's Husk answer for #1.

All of the following programs work:

ÅTθ-
ÅTθQ
ÅT-θ
ÅT-¤
ÅTI¢
ÅTIå
ÅTs¢
ÅTså
ÅT¹¢
ÅT¹å

Try each and every single one of these programs online!

ÅT is all triangular numbers \$≤\$ implicit input, θ and ¤ are last element (a[-1]), - is subtraction, Q is equality (a==b), I and ¹ are input (input()), ¢ is occurrences (a.count(b)), and å is membership (b in a).

05AB1E, 4 bytes

All of the following programs work:

ÅTθQ
ÅTI¢
ÅTIå
ÅTs¢
ÅTså
ÅT¹¢
ÅT¹å

Try each and every single one of these programs online!

ÅT is all triangular numbers \$≤\$ implicit input, θ is last element (a[-1]), Q is equality (a==b), I and ¹ are input (input()), ¢ is occurrences (a.count(b)), and å is membership (b in a).

Source Link
Makonede
  • 6.6k
  • 20
  • 49

05AB1E, 4 bytes

Ties Jonathan Allan's Jelly answer, Cowabunghole's 05AB1E answer, Stephen's cQuents answer, rev's 05AB1E answer, PkmnQ's cQuents answer, and Razetime's Husk answer for #1.

All of the following programs work:

ÅTθ-
ÅTθQ
ÅT-θ
ÅT-¤
ÅTI¢
ÅTIå
ÅTs¢
ÅTså
ÅT¹¢
ÅT¹å

Try each and every single one of these programs online!

ÅT is all triangular numbers \$≤\$ implicit input, θ and ¤ are last element (a[-1]), - is subtraction, Q is equality (a==b), I and ¹ are input (input()), ¢ is occurrences (a.count(b)), and å is membership (b in a).