Skip to main content

New answers tagged

1 vote

Number of string permutations that are palindromes

Japt, 7 bytes á â èêS Try it ...
Shaggy's user avatar
  • 45k
0 votes

Number of string permutations that are palindromes

Vyxal 3, 5 bytes ⑴/⇄⧖∑ Vyxal It Online! ...
Themoonisacheese's user avatar
0 votes

Add Y to X to get a palindrome

Desmos, 137 bytes q(x,n)=floor(mod(x/10^n,10)) l=floor(log(x+y)+1)-1 f(x,y)=\left\{(q(x+y,[l...0])-q(x+y,[0...l]))^2.total=0:y,f(x,y+1)\right\} g(x)=f(x,0) Graph ...
ayaan098's user avatar
  • 151
0 votes

Add Y to X to get a palindrome

AWK, 76 bytes {for(i--;!z;i++){b=X;for(j=0;j++<split($0,a,X);)b=a[j]b;b==$0++&&z++}}1,$0=i Attempt This Online!
xrs's user avatar
  • 2,047
1 vote

Add Y to X to get a palindrome

Perl 5, 60 + 1 (-n option) = 61 bytes $==0;$_++,$=++while@_=/./g,grep$_[$_++]-$_[-$_],0..$#_;say$= Try it online!
Denis Ibaev's user avatar
  • 1,515
0 votes

Add Y to X to get a palindrome

Haskell, 45 bytes f n=[x-n|x<-[n..],show x==(reverse.show)x]!!0 Try it online! Tried (==).reverse<*>id$show x as the ...
Luke Sharkey's user avatar
1 vote

Add Y to X to get a palindrome

Vyxal 3, 6 bytes ⑵⁰+/⇄N Vyxal It Online! ...
Themoonisacheese's user avatar
2 votes

Add Y to X to get a palindrome

Uiua (0.18), 14 13 bytes -⟜⍢+₁(≠⊸⍜°⋕⇌) Uiua pad this online ...
ojdo's user avatar
  • 835

Top 50 recent answers are included