Skip to main content
Commonmark migration
Source Link

#Pyth, 57 55 53 bytes

Pyth, 57 55 53 bytes

AQjd[G"is"@c"equal to
greater than
less than"b._-GHH)

This basically does:

["less than", "greater than", "equal to"][sign_of(A-B)]

Saved 2 bytes thanks to @AlexA.'s suggestion of using A instead of J and K and another 2 bytes by replacing the whole addition mess with a simpler subtraction.

Live demo and test cases.

##55-byte version

55-byte version

AQjd[G"is"@c"less than
greater than
equal to"b+gGHqGHH)

Live demo and test cases.

##57-byte version:

57-byte version:

jd[JhQ"is"@c"less than
greater than
equal to"b+gJKeQqJKK)

Live demo and test cases.

#Pyth, 57 55 53 bytes

AQjd[G"is"@c"equal to
greater than
less than"b._-GHH)

This basically does:

["less than", "greater than", "equal to"][sign_of(A-B)]

Saved 2 bytes thanks to @AlexA.'s suggestion of using A instead of J and K and another 2 bytes by replacing the whole addition mess with a simpler subtraction.

Live demo and test cases.

##55-byte version

AQjd[G"is"@c"less than
greater than
equal to"b+gGHqGHH)

Live demo and test cases.

##57-byte version:

jd[JhQ"is"@c"less than
greater than
equal to"b+gJKeQqJKK)

Live demo and test cases.

Pyth, 57 55 53 bytes

AQjd[G"is"@c"equal to
greater than
less than"b._-GHH)

This basically does:

["less than", "greater than", "equal to"][sign_of(A-B)]

Saved 2 bytes thanks to @AlexA.'s suggestion of using A instead of J and K and another 2 bytes by replacing the whole addition mess with a simpler subtraction.

Live demo and test cases.

55-byte version

AQjd[G"is"@c"less than
greater than
equal to"b+gGHqGHH)

Live demo and test cases.

57-byte version:

jd[JhQ"is"@c"less than
greater than
equal to"b+gJKeQqJKK)

Live demo and test cases.

added 417 characters in body
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46

#Pyth, 57 5555 53 bytes

AQjd[G"is"@c"lessAQjd[G"is"@c"equal thanto
greater than
equalless to"b+gGHqGHHthan"b._-GHH)

This basically does:

["less than", "greater than", "equal to"][(A>=B)+to"][sign_of(A==BA-B)]

Saved 2 bytes thanks to @AlexA.'s suggestion of using A instead of J and K and another 2 bytes by replacing the whole addition mess with a simpler subtraction.

Live demo and test cases.

##55-byte version

AQjd[G"is"@c"less than
greater than
equal to"b+gGHqGHH)

Live demo and test cases.

##57-byte version:

jd[JhQ"is"@c"less than
greater than
equal to"b+gJKeQqJKK)

Live demo and test cases.

#Pyth, 57 55 bytes

AQjd[G"is"@c"less than
greater than
equal to"b+gGHqGHH)

This basically does:

["less than", "greater than", "equal to"][(A>=B)+(A==B)]

Saved 2 bytes thanks to @AlexA.'s suggestion of using A instead of J and K.

Live demo and test cases.

##57-byte version:

jd[JhQ"is"@c"less than
greater than
equal to"b+gJKeQqJKK)

Live demo and test cases.

#Pyth, 57 55 53 bytes

AQjd[G"is"@c"equal to
greater than
less than"b._-GHH)

This basically does:

["less than", "greater than", "equal to"][sign_of(A-B)]

Saved 2 bytes thanks to @AlexA.'s suggestion of using A instead of J and K and another 2 bytes by replacing the whole addition mess with a simpler subtraction.

Live demo and test cases.

##55-byte version

AQjd[G"is"@c"less than
greater than
equal to"b+gGHqGHH)

Live demo and test cases.

##57-byte version:

jd[JhQ"is"@c"less than
greater than
equal to"b+gJKeQqJKK)

Live demo and test cases.

added 426 characters in body
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46

#Pyth, 5757 55 bytes

jd[JhQ"is"@c"lessAQjd[G"is"@c"less than
greater than
equal to"b+gJKeQqJKKto"b+gGHqGHH)

This basically does:

["less than", "greater than", "equal to"][(A>=B)+(A==B)]

Saved 2 bytes thanks to @AlexA.'s suggestion of using A instead of J and K.

Live demo and test cases.

##57-byte version:

jd[JhQ"is"@c"less than
greater than
equal to"b+gJKeQqJKK)

Live demo and test cases..

#Pyth, 57 bytes

jd[JhQ"is"@c"less than
greater than
equal to"b+gJKeQqJKK)

This basically does:

["less than", "greater than", "equal to"][(A>=B)+(A==B)]

Live demo and test cases.

#Pyth, 57 55 bytes

AQjd[G"is"@c"less than
greater than
equal to"b+gGHqGHH)

This basically does:

["less than", "greater than", "equal to"][(A>=B)+(A==B)]

Saved 2 bytes thanks to @AlexA.'s suggestion of using A instead of J and K.

Live demo and test cases.

##57-byte version:

jd[JhQ"is"@c"less than
greater than
equal to"b+gJKeQqJKK)

Live demo and test cases.

Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46
Loading