Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 74571

For challenges involving the manipulation of integers.

2 votes

How quickly can you type this unary string?

Python3, 327 bytes R=range def f(n): q,s,r=[(0,0)],[],[] for a,c in q: if a==n:r+=[c];continue if r and c>=min(r):continue if a<3:q+=[(a+1,c+1)] else: U=[(a+1,c+1)] for i in R(3,min(a, …
Ajax1234's user avatar
  • 7,711
1 vote

Manipulate integers to zero

Python3, 292 bytes lambda v:0 in[*f(v)] R=range def f(v): k=[v] for i in R(len(v)): for j in R(i+1,len(v)+1): if j-1>1 and j-i<len(v): for t in f(v[i:j]):k+=[v[:i]+[t]+v[j:]] for i in k: …
Ajax1234's user avatar
  • 7,711
4 votes

Is it a Frog List?

Python3, 498 bytes: E=enumerate def V(x,l):r=len(K:=set({x[i+1]-a for i,a in E(x)if i+1<len(x)}));return r==1and max(x)+max(K)>=len(l) T=lambda x:[*filter(None,x)] P=sorted def f(l): if len(T(l))==1: …
Ajax1234's user avatar
  • 7,711
3 votes

Find a matrix whose sliding sum is the input

Python3, 556 bytes: from itertools import* R=range D=lambda l,y:l*y-(y-1)*(l-1) def O(V,v): c=0 while c:=c+1: for i in product(*[[R(-c,c+1),[a]][b]for a,b in V]): if sum(i)==v:return[*i] def f( …
Ajax1234's user avatar
  • 7,711
1 vote

Line Islands in a Word Search

Python3, 560 bytes: lambda w:len({str(i[0])for i in g(w)}) S=lambda a:[(t:=(a[1][0]-a[0][0])/([1,(k:=a[1][1]-a[0][1])][k!=0])*(k>0)),[a[0][1],t*-1*a[0][1]+a[0][0]][k!=0]] M=lambda j,k:[(x:=(k[1]-j[1]) …
Ajax1234's user avatar
  • 7,711
5 votes

How-many-bonacci-like is this sequence?

Python3, 102 bytes: lambda x,c=0:(v(x,c)and c)or(x and f(x,c+1)) v=lambda x,i:len(x)<=i or(sum(x[:i])==x[i]and v(x[1:],i)) Try it online!
Ajax1234's user avatar
  • 7,711