Skip to main content
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
Results tagged with
Search options not deleted user 58766

The challenge involves mathematics in some central way. Also consider using more specific tags, listed in the tag wiki info.

4 votes

Sum or difference of two powers of two

JAVA 7 ,142 ,140, 134 BYTES This is my first post on PPCG!I would really appreciate for feedback on golfing tips Thanks to frozen for saving 2 bytes void f(long n){for(int i=-1,j;i++<31;)for(j=0; …
Numberknot's user avatar
2 votes

How many integers contain a number in a specific range

Java 7 85 bytes int x(int a,int b,int c){int t=0;for(;b<=c;)if((b+++"").contains(a+""))t++;return t;}
Numberknot's user avatar
3 votes

Maximal number of regions obtained by joining n points around a circle by straight lines

Java 7,50 47 bytes int c(int n){return(n*n*(n-6)+23*n-18)*n/24+1;} Uses the formula (from OEIS)
Numberknot's user avatar
1 vote

There can be only 1!

JAVA Primary Score 1045978739 Secondary score 12/09/2016 16:05 37193 1s 28123 operators void main() { int arr[]={945536, 16878234, 32608778, 42017515, 48950830, 51483452, 5297026 …
Numberknot's user avatar
1 vote

Find the maximum deviation

Java 7,159 bytes Java = expensive(i know it can be golfed much more) int c(int[]a,int d){int[]b=new int[d];int i,j,s=0;for(i=-1;i<a.length-d;){for(j=++i;j<i+d;)b[i+d-1-j]=a[j++];Arrays.sort(b);s=(j= …
Numberknot's user avatar
7 votes

Compute the kangaroo sequence

Java 7, 35 bytes int c(int n){return(n*n-1<<n-1)+1;}
Numberknot's user avatar