Skip to main content
3 of 3
deleted 205 characters in body
Makonede
  • 6.6k
  • 20
  • 49

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).

Makonede
  • 6.6k
  • 20
  • 49