Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- t = 1000000; \\ tiles
- xlow = floor(sqrt(t));
- xhigh = floor(t/4)+1;
- s = floor((xlow-1)/2);
- s *= (s+1); \\ running total
- x2 = xlow*xlow;
- for(x=xlow+1,xhigh,
- x2 += x+x-1;
- s += floor((x - ceil(sqrt(x2-t)))/2);
- );
- print(s);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement