Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
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 41723

Challenges related to elementary arithmetic.

2
votes
Brachylog, 50 bytes ,L##l4,L:{.~e[0:3]}a:[2:5:10:20]*+:10+?,L:{:2*.}a. Returns false when not possible.
answered Jun 29 '16 by Fatalize
3
votes
Brachylog, 42 bytes :{bh.}a*g:?z:2aott. [D:[S:I:J]]tt:D*:I/:S. Try it online! / above is integer division because both J*D and I are integers (D is a multiple of I in fact). Explanation Main pr …
answered Jul 21 '16 by Fatalize
2
votes
Brachylog, 8 bytes (Non-competing) <.=:ef+? = was modified after this challenge got posted, so that it now works on possibly infinite domains, which is the case here. Explanation <. Output …
answered Jun 2 '16 by Fatalize
8
votes
Brachylog, 2 bytes +. Expects a list with the two numbers as input Alternatively, if you want the answer to STDOUT: +w
answered Jul 2 '16 by Fatalize
2
votes
Brachylog, 12 bytes ,10y:[?]z:*a Try it online! I need to implement that I * [A, B, C] = [I*A, I*B, I*C]… Explanation ,10y The range [0, 1, …, 10] :[?]z The list [[0, Input] …
answered Sep 7 '16 by Fatalize
5
votes
Brachylog, 14 bytes #$:18ot|:1.4ot Try it online! Explanation #$ Input is an integer :18o Sort the list [Input, 18] t Take the last element | …
answered Sep 29 '16 by Fatalize
3
votes
Brachylog, 16 bytes ;I×≜.ẹḅhᵐc~a₀90∧ Try it online! This is pretty slow Explanation ;I×≜. Output = Input × I .ẹḅ Deconcatenate into runs of consecutive equal digits …
answered Jul 6 '17 by Fatalize
1
vote
Brachylog, 16 bytes or:@]feL:la#=,Lh Try it online! Explanation or Sort the list in descending order. :@]f Find all suffixes of the list. eL Take one …
answered Sep 16 '16 by Fatalize
15
votes
J, 7 questions/answers, none about J echo a%b[echo a*b[echo a-b[echo a+b[b=:?2147483647 [a=:?2147483647 It's a pretty damn cheap way to do it, I'm not gonna lie. Here are the SO answers I used: e …
answered Jul 26 '15 by Fatalize
1
vote
Brachylog, 5 bytes ⟦^₂ᵐ+ Try it online! Explanation ⟦ Range ^₂ᵐ Map square + Sum
answered Oct 17 '17 by Fatalize
14
votes
Brachylog, 3 bytes ḋd× Try it online! A very original answer... Explanation ḋ Take the prime factors of the Input d Remove duplicates × Multiply
answered May 11 '17 by Fatalize
9
votes
Brachylog, 8 bytes ḋoọc;1xc Try it online! Explanation Example input: 60 ḋ Prime decomposition: [5,3,2,2] o Order: [2,2,3,5] ọ Occurences: [[2,2],[3,1],[5,1]] c …
answered Jun 9 '17 by Fatalize
6
votes
Brachylog, 2 bytes +< Try it online! Explanation + The sum of the elements in the Input... < ...is strictly less than the Output (implicitely label the output with an integer respec …
answered Feb 13 '17 by Fatalize
7
votes
SWI-Prolog, 381 bytes s([E|T],[F|N]):-E=F,(N=[];s(T,N));s(T,[F|N]). a(A):-split_string(A," \n","",B),w(B,[],C),setof(L,s(`CJMPRS`,L),M),x(C,[` `|M]). w([A,B|T],R,Z):-number_string(N,A),(B="",C=` `;st …
answered Jul 7 '15 by Fatalize
3
votes
Brachylog, 5 bytes $!@e+ Try it online! Explanation Basically the described algorithm: $! Take the factorial of the Input @e Take the elements of this factorial (i.e. its digits) …
answered Nov 23 '16 by Fatalize

15 30 50 per page