Search Results
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 |
The challenge involves mathematics in some central way. Also consider using more specific tags, listed in the tag wiki info.
3
votes
Find the powertrain!
Java doesn't have support
// for the "**" operation, and the way of turning
// an integer into a string takes too many bytes,
// I decided just to put every digit into an array with
// math … and iterate from there
for(int i=1;i<=size;){
int place=(int)Math.pow(10,i);
//crazy math. …
1
vote
Product over a range
Matricks, 24 bytes
Matricks is a new esolang I invented to deal with matrices. Run like: python matricks.py [[<num1>,<num2>]]
mg:;+c:1:g:1;-g:;;kp{};;
This is a simple answer. Matricks has a built …
2
votes
Find the Matrix Power
Python 2.7, 158 145 bytes
The worst answer here, but my best golf in Python yet. At least it was fun learning how to do matrix multiplication.
Golfed:
def q(m,p):
r=range(len(m))
if p<1:return[[x==y …
8
votes
Rotate a hypercube
C# + Unity, 1060 845 835 bytes
C# ≈ Java
Assumes that this function is in a script placed on MainCamera.
Edit:
Thanks to @TuukkaX for the suggestions to save 19 bytes
Saved ~200 bytes using the Euleri …
17
votes
Divisibility test
Hexagony, 15, 13, 12 10 bytes
Everybody's favorite hexagon-based language! :D
TL;DR works using magic, unformatted solutions in decreasing byte count:
?{?..>1'%<.@!'/
?{?!1\.'%<@.>
?{?\!1@'%\!(
?{?!1\ …
2
votes
Substring Sum Set
Matricks, 25 bytes
Yay, finally a challenge I don't need new features for!
md{z:l-g:c;+c;q:c;};:1:l;
Run with: python matricks.py substring.txt [[<input>]] 0
Explanation:
m :1:l; # …