« first day (3063 days earlier)      last day (1773 days later) » 

7:52 AM
0
Q: Distributing parliament seats

scfIntroduction In a general election, one would like to calculate a constant price per parliament seat. This means that for N >= 0 seats to be distributed and a list ns of votes per party, we would like to find a number d such that sum(floor(n/d) for n in ns) == N To make things interesting (...

 
 
1 hour later…
8:52 AM
0
Q: Print the total length of all "quoted" characters

user2652379Rules In this challenge, I'm going to redefine the definition of "quotes" a bit. Quotation marks (AKA quotes) are any identical characters used in pairs in various writing systems to set off direct speech, a quotation, or a phrase. The pair consists of an opening quotation mark and a closing q...

 
9:21 AM
@Mego @Dennis @DJMcMayhem Could you please clear the comments for this challenge? (it was edited and undeleted, following another user's suggestion -- although I personally think that it would have been better to just re-post it as the OP initially did)
 
 
4 hours later…
1:26 PM
@Arnauld Done.
 
0
Q: Find the C-factor of a vote

connectyourchargerIn this challenge you will be determining how controversial a vote is, given an array of other votes, by figuring out a number called the C-factor. What is the C-factor, you ask? Well, imagine you've got multiple votes on an election. We'll use 1 and 0 for the sake of the challenge to represent ...

 
1:44 PM
@Dennis Thank you :)
 
 
3 hours later…
4:17 PM
CMC: Given a Boolean List B and a number N, answer with N times the number of trailing Trues in B. For example [1,0,1,1,1], -1.5 -4.5
 
Ooh, something brain-flak is actually good at!
@Adám Brain-flak (plus -r flag), 30 bytes: ({}<>)<>({<{}><>({})<>}<><{}>)
Python 3, 29 bytes: lambda l,n:l[::-1].index(0)*n
A 1 byte difference
 
4:33 PM
Stupid snmpwalk
 
0
Q: Convert a string containing integers to list of integers

Nelson G.What is the shortest way to convert a string containing integers separated by spaces to a list of integers? input : "-3 1 5 8 10" output : [-3, 1, 5, 8, 10]

 
@Adám 35 bytes
 
4:48 PM
@NewMainPosts This trick is really cool: eval(s.replace(*" ,"))
 
Looks like witchcraft to me
That's a burnin'
 
I see @SriotchilismO'Zaic has entered the room. Have the words "brain-flak" summoned you? :P
 
I'll be impressed if you see a way to shave any off. I can't see anything.
Perhaps a harder challenge would be doing it without the -r flag
 
Yeah it looks pretty tight
 
5:06 PM
@DJMcMayhem 48 without -r
 
@Adám Dyalog Extended, 5 bytes; arr⊥scalar is still pointless imo
oh hmm doesn't work with an empty array
 
@dzaima 9 bytes working with an empty array
 
@dzaima But can you do it in 3?
 
uh 20 bytes not 2
 
5:47 PM
@Adám can't think of anything
 
cjam: \e`W=~**
 
6:21 PM
@Adám MATL, 5 bytes: PYp*s
 
6:35 PM
0
Q: Impossible darts scores

beirtipolI was surprised to not find this asked already, though there is a great question on darts checkouts: Darts meets Codegolf Your challenge is to calculate which scores are not possible with 'n' darts below the maximum score for 'n' darts. E.g. for n=3, the maximum possible score is 180 so you woul...

 
7:01 PM
CMC: Given a list of integers, return the same list with the largest run of equal integers removed. If there's a tie for length, remove the earliest appearance.
[1, 2, 4, 1, 6, 6, 2, 3] --> [1, 2, 4, 1, 2, 3]
[1, 2, 3, 4, 5] --> [2, 3, 4, 5]
[4, 4, 3, 2, 5, 6, 5, 4, 3, 8, 7, 6, 6, 6, 5, 9, 3] --> [4, 4, 3, 2, 5, 5, 4, 3, 8, 7, 5, 9, 3]
 
[4,4,6,6] -> [6,6] might be a decent test case
Granted, that's just 1..5 now that I think about it
 
Yes. And also [1] --> [] or [2, 2, 2, 2] --> []
@Veskah Yeah, they're similar
 
7:23 PM
@DJMcMayhem dzaima/APL, 36 bytes. way too long..
the could be removed when tio is pulled, there was a bug with that i've now fixed
 
7:44 PM
@DJMcMayhem Jelly, 11 bytes: ŒgJḟẈMḢƊịƲẎ
 
8:00 PM
@dzaima vec(⊥-⊢)num
 
@Adám thing is, that doesn't work
 
@dzaima no?
 
@Adám try ⍺ of , or 1 1 1
my answers are pretty much that, but fixed
but, I wrote a brute-forcer and it found an actual 3 byte solution that does work
 
@dzaima ?
 
the solution it found, haven't bothered to understand how it works
 
 
3 hours later…
11:04 PM
@DJMcMayhem Mathematica, 42 bytes: Try it online!
 
11:16 PM
It's still 21 bytes compressed in Sledgehammer. Mathematica patterns have a pretty high symbol to uncompressed byte count ratio.
 

« first day (3063 days earlier)      last day (1773 days later) »