Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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 user 52622

The challenge involves mathematics. Also consider using more specific tags: [number] [number-theory] [arithmetic] [combinatorics] [graph-theory] [geometry] [abstract-algebra].

3
votes
Ruby, 22 bytes Stealing @xnor's trick and making a stabby-lambda: r=->(m,n){m*n*~m*~n/4} Example call: r[6,7] # => 588 Or as a proc, also 22 bytes: proc{|m,n|m*n*~m*~n/4} Which we could …
answered Aug 2 '16 by David Ljung Madison Stellar
2
votes
Ruby, 63 bytes With z as a two-dimensional array of numbers: s=0;z.each_index{|i|z[i].each_index{|j|s+=i+j if z[i][j]==i+j}} Not terribly exciting at all. If z is a flattened array with x and y h …
answered Jul 20 '16 by David Ljung Madison Stellar
1
vote
Ruby, 21 bytes @Qwerp-Derp basically did the heavy lifting. Because of the precedence in ruby, it seems we need some parens: ->(n){(n*n-1<<n-1)+1}
answered Oct 16 '16 by David Ljung Madison Stellar