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 18638

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

0
votes
J (20): Not quite complying with the rules as they are now, but hey... JS isn't either ;) }.(1=a+.i.101)#i.101 Showcase: a=:3 }.(1=a+.i.101)#i.101 2 4 5 7 8 10 11 13 14 16 17 19 20 22 23 25 …
answered Jun 1 '14 by ɐɔıʇǝɥʇuʎs
1
vote
Python (73): Can probably be golfed a heck of a lot more. i=0 while 1: i+=1;j=i;k=0 while j!=1:j=(j/2,j*3+1)[j%2];k+=1 print i,k
answered Apr 4 '14 by ɐɔıʇǝɥʇuʎs
1
vote
Python 59-25-50-10 (-100): -26 (or -126, again: depending on how you see P2's input()) Oh wait, xrange supports things outside of range's scope. One character extra for 25 bonus points? Sure! sum( …
answered Mar 16 '14 by ɐɔıʇǝɥʇuʎs
1
vote
J (between 2 and 32) I'm not quite clear on i/o format, but I think C. would do, if the following output would be accepted: C. 0 1 3 4 5 6 7 2 ┌─┬─┬───────────┐ │0│1│7 2 3 4 5 6│ └─┴─┴─────────── …
answered Aug 13 '14 by ɐɔıʇǝɥʇuʎs
1
vote
Python It's legit, I swear! eval=len print eval("2 + 2")
answered Jun 9 '14 by ɐɔıʇǝɥʇuʎs
0
votes
Python (3) Since there are quite a few of these questions these days, I decided to make a program to automatically solve them in 3 (or 2) tokens. Here's the result for this challenge: G:\Users\Synth …
answered Jul 17 '14 by ɐɔıʇǝɥʇuʎs
1
vote
Python + networkx (Bruteforce, checks about 10000 paths per second on my machine) It's not fast, but it works at least. Checks literally every path. Amount of cycles necessary can be found here. Th …
answered Jun 26 '14 by ɐɔıʇǝɥʇuʎs
5
votes
Python 2 (46+271=327) Code: print open('f').read().decode('zip').split(';')[input()] File f, containing the following binary garbage (these are the char codes) 120, 156, 101, 146, 219, 21, 195, 3 …
answered Sep 11 '14 by ɐɔıʇǝɥʇuʎs
0
votes
J x=:!123 x=x+2 1 This is also reliant on the floating point trick: !123x=2+!123x returns 0(= actually is the comparison operator, so no trickery there) Or, maybe even better: x=:_ x= …
answered Jun 9 '14 by ɐɔıʇǝɥʇuʎs
2
votes
J (34) This should work I think. It would be nice if you gave some test cases... f=:~:/ .*&.(8 8&$@(_64&{.) :.,@#:) This works with the test cases supplied in the comments (when changing 8 8 to 4 …
answered Aug 20 '14 by ɐɔıʇǝɥʇuʎs
3
votes
J (10) Very, very, very inspired by the answer of @Dennis: <.@%~^&1.5 And a slightly longer, but with better performance (I suspect): <.@(-:&.^.) floor(halve under log) To execute, indented pa …
answered Sep 1 '14 by ɐɔıʇǝɥʇuʎs
77
votes
I came across this the other day. I don't take credit for it, but damn, is it awesome: Python 2: _ = ( 255, …
answered Mar 8 '14 by ɐɔıʇǝɥʇuʎs
7
votes
1990 - J Task 1: Hello World! 'J was made in 1990!' This reflects the typical use of J: in an REPL, this would echo the string back at you. Not very useful in general, but exactly what we want her …
answered Apr 20 '15 by ɐɔıʇǝɥʇuʎs
2
votes
J (20) This turned out longer than I hoped or expected.Still: shorter than haskel! */@:^"1#:@i.@(2&^)@# Usage: f=:*/@:^"1#:@i.@(2&^)@# f 2 3 5 7 1 7 5 35 3 21 15 105 2 14 10 70 6 42 30 21 …
answered Nov 27 '14 by ɐɔıʇǝɥʇuʎs