Skip to main content
functions are allowed, too
Source Link
nimi
  • 35.9k
  • 4
  • 34
  • 99

Haskell, 5838 bytes

main=readLn>>=print.([x|x<-[1..],(/=)<*>reverse$show x]!!)

Uses 0-based index. ([x|x<-[1..],(/=)<*>reverse$show x]!!) 11 -> 23.

The test whether to keep a number (/=)<*>reverse$show x translates to (show x) /= (reverse (show x)), i.e check if the string representation of the number does not equal the reverse of the string representation.

Haskell, 58 bytes

main=readLn>>=print.([x|x<-[1..],(/=)<*>reverse$show x]!!)

Uses 0-based index.

The test whether to keep a number (/=)<*>reverse$show x translates to (show x) /= (reverse (show x)), i.e check if the string representation of the number does not equal the reverse of the string representation.

Haskell, 38 bytes

([x|x<-[1..],(/=)<*>reverse$show x]!!)

Uses 0-based index. ([x|x<-[1..],(/=)<*>reverse$show x]!!) 11 -> 23.

The test whether to keep a number (/=)<*>reverse$show x translates to (show x) /= (reverse (show x)), i.e check if the string representation of the number does not equal the reverse of the string representation.

Source Link
nimi
  • 35.9k
  • 4
  • 34
  • 99

Haskell, 58 bytes

main=readLn>>=print.([x|x<-[1..],(/=)<*>reverse$show x]!!)

Uses 0-based index.

The test whether to keep a number (/=)<*>reverse$show x translates to (show x) /= (reverse (show x)), i.e check if the string representation of the number does not equal the reverse of the string representation.