text:
Obfuscated FizzBuzz Golf
Create the shortest possible obfuscated FizzBuzz implementation.
To be considered obfuscated, it should satisfy at least one of the following:

Does not contain any of the words "Fizz", "Buzz", or "FizzBuzz"
Does not contain the numbers 3, 5, or 15.
Use any of the above in a misleading way.

Remember: The goal is to be short and hard to follow.
The code sample which inspired this question follows:
public class Default
{
        enum FizzBuzz
        {
            Buzz = 1,
            Fizz,
            FizzBuzz
        }
        public static void Main(string[] args)
        {
            byte[] foo =
              Convert.FromBase64String("IAmGMEiCIQySYAiDJBjCIAmGMEiCIQySYA==");
            MemoryStream ms = new MemoryStream(foo);
            byte[] myByte = new byte[1];
            do
            {
                FizzBuzz fb;
                ms.Read(myByte, 0, 1);
                for (int i = 0; i < 4; i++)
                {
                    fb = (FizzBuzz)(myByte[0] >> (2 * i)
                         & (int)FizzBuzz.FizzBuzz);
                    Console.Out.WriteLine( (((int)fb > 0) ? "" + fb : ""
                         + ((ms.Position - 1) * 4 + i + 1)));
                }
            } while (ms.Position < ms.Length);
        }
}

How do you know the bound ? In your solution you have ms.Length but in some solutions there is no such bound...

I'm voting to close this question as off-topic because it does not have an objective validity criterion, making it impossible to indisputably decide whether a submission follows the rules.

GolfScript, 75 69 65 60 59 chars
100,{)6,{.(&},{1$1$%{;}{4*35+6875*25base{90\-}%}if}%\or}%n*

So, you'd think GolfScript by itself is already obfuscated, right? Well, just to follow the spec, I decided to have the program not contain "fizz", "buzz", nor the numbers 3, 5, nor 15. :-)
Yes, there are some numbers with multiples of 5, like 25, 35, 90, 100, and 6875. Are they red herrings? You decide. ;-)

Although I've written commentary for all my other GolfScript submissions, none will be forthcoming for this one. Rationale: http://chat.stackexchange.com/transcript/message/436819#436819 :-D

The numbers 3 and 5 appear in your code, so it is not correct !!!

@Labo Only one of the criteria needs to be satisfied, not all three. Read the question again. :-)

Is it a JOKE ? I spend several hours on that ! Though I still managed to have a 58 chars long Python code :p http://codegolf.stackexchange.com/a/63543/47040

Without this constraint, I achieve 54 chars :D

@Labo Okay, I upvoted your answer. I'm not the OP so I can't change the accepted answer. Lol.

Lol no problem, thanks :)

@Labo: I can see the digits 3 and 5 but not the numbers 3 and 5.

Javascript 97 chars - no numbers at all
Numbers ? Who needs number when you have Javascript !
a=b=!![]+![],a--,c=b+b;while(++a)e=!(a%(c+c+b)),alert(!(a%(c+b))?e?"FizzBuzz":"Fizz":e?"Buzz":a);

Note: There is an infinite loop that will alert you the sequence.
Bonus (666 chars)

No number
No letter (only zfor has been use in the whole script)

.
_=$=+!![];$__=((_$={})+'')[_+$+_+$+_];__$=((![])+'')[$];_$_=((_$={})+'')
[_+$+_+$+_+$];____=[][$__+((_$={})+'')[$]+(($)/(![])+'')[$]+$__+__$+_$_];$__$=(!![]+"")
[$+$+$]+([][(![]+"")[$+$+$]+(+[]+{})[$+$]+(!![]+"")[$]+(!![]+"")[+[]]]+"")[($+$)+""+
($+$+$)]+(![]+"")[$]+(![]+"")[$+$];$_$_=____()[$-$][$__$]("\"\\"+($)+($+$+$+$+$+$+$)+
($+$)+"\"");_$=(![]+'')[$-$]+([][[]]+[])[$+$+$+$+$]+$_$_+$_$_;$_=(_+{})[$+$+$]+(!![]+'')
[_+$]+$_$_+$_$_;_--,$$=$+$;____()[$-$][$__$]((![]+"")[+[]]+(+[]+{})[$+$]+(!![]+"")[$]+
"(;++_;)$$$=!(_%("+($$+$$+$)+")),____()[+[]][__$+((![])+'')["+($+$)+"]+((!![])+'')["+
($+$+$)+"]+((!![])+'')[+!![]]+_$_](!(_%("+($$+$)+"))?$$$?_$+$_:_$:$$$?$_:_);");

Real programmers code just like the second one.

@M28: Yep. That's one way to build job security...'cause finding someone who can maintain this code wouldn't be the easiest thing.

You can use window"eval" for z.

@Nabb I took the eval trick even further now.

I really want to understand how the second one works.

@stevether It's mostly about abusing type conversion (ex.: +!![] is the same as 1 and ({}+"")[5] is the same as c) and abusing array notation to access method (ex.: window['eval']( is the same eval( ).

Appropriate character count if I've ever seen one.

congratulations for having the 100th post on codegolf.SE! (http://codegolf.stackexchange.com/q/100)

The second one doesn't run on latest version of Firefox (Type error, can't convert undefined to object). Would you please check it?

@nhahtdh Looks like they changed the behavior of "Array.prototype.concat" and the new behavior is actually how it's suppose to be implemented. The code used a common misbehavior of browser, where "Array.prototype.concat()[0]" returns "window".

I think the first version violates rule number 1?

looks like BrainF*ck on Java(Script)

Python - 78 chars
i=0
while 1:i+=1;print"".join("BzuzzizF"[::2*j]for j in(-1,1)if 1>i%(4+j))or i

Took me 10 minutes to understand what you did there. Nice and twisted.

PostScript, 96 bytes
So obfuscated it looks like random garbage.
1<~0o0@eOuP7\C+tf6HS7j&H?t`<0f>,/0TnSG01KZ%H9ub#H@9L>I=%,:23M].P!+.F6?RU#I;*;AP#XYnP"5~>cvx exec

Usage: $ gs -q -dNODISPLAY -dNOPROMPT file.ps

I bet that passes diehard.

C++: 886 chars
I've tried to hide the 'fizz' and the 'buzz'. Can you spot them?
#include <iostream>
#define d(a,b) a b
#define _(a,b) d(#b,#a)
#define b(b) _(b,b)
#define y _(i,f)c
#define x _(u,b)c
#define c b(z)
#define i int
#define p main
#define s char
#define q 810092048
#define h for
#define m 48
#define a ++
#define e ==
#define g 58
#define n 49
#define l <<
#define oe std::cout<<
#define v '\n'

int  p   (i,  s*t     ){i   j  =   q;h   (*(
i    *     )    t     =  m  ;  2     [     t
]?   0    :    1      ??(   t  ]    ?     a
1    [   t    ]       e  g  ?  1   [     t
]    =   48,  ++0     ??(    t]e   g?0   ??(

t]=  n   ,1[  t]=
2    [     t    ]
=m   :    1    :
1    :   a    0
[    t   ??)  ==g

?0[   t  ]   =49   ,1[
t  ]  =  m     :     1
;j=   (  j    /     4
)  |  (  (   j     &
3)l    28)   )oe   (j&

3?j  &   1?j  &2?
y    x     :    y
:x   :    t    )
l    v   ;    }
i    f   =m&  ~g;

That confuzzlesing my brane.

I think you meant membrane

DC (256 255 bytes)
Here it is, I tried (rather successfully, if I may say so myself) to hide anything except for letters, and +-[];:= (which are vital and impossible to obfuscate). It does segfault after getting to about 8482 or so on my machine, but that is to do with stack issues related to the way the recursion is implemented. The solution itself is correct. 255 bytes if you remove the whitespace (included for ease of reading) Enjoy:
Izzzdsa+dsbrsc+dsdd+sozdsezzsm+s
nloddd++splbz++ddaso+dln-dstsqlm
d+-sr[PPPP]ss[IP]su[lpdlqlrlsxlu
x]lm:f[lpdltdI+lm+rlblm+-lsxlux]
ln:f[[]sulm;fxln;f[IP]sux]la:f[;
fsk]sg[lmlgx]sh[lnlgx]si[lalgx]s
j[lc[lcp]sklerldlolclerlblolcler
lalox=hx=ix=jlkxclcz+scllx]dslx

+1 for dc. Even unobfuscated, of course, it's not especially readable.

Brainfuck - 626 656
+[[>+>+<<-]>>>+++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]<[<+>>+<-]>>[-]+++>[
<<<+>>>-]>[-]<<<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>>[-]<<<<[>+<-]>>>[<
<<+>>>-]<<[>>+<<-]<[>+>+<<-]>[<+>-]+>[<->[-]]<[>>>[-]>[-]<>+++++++[<++
++++++++>-]<.>+++++[<+++++++>-]<.+++++++++++++++++..[-]+<<<-]<[-]>>>[<
+<+>>-]<[>+<-]+<[>-<[-]]>[>>>[-]>[-]<>++++++[<+++++++++++>-]<.>+++++[<
++++++++++>-]<+.+++++..[-]<+<<-]>[-]>[<+<+>>-]<[>+<-]+<[>-<[-]]>[<<<<[
>+>>>>+<<<<<-]>[<+>-]>>>>>>--[<->+++++]<--<[->-[>+>>]>[+[-<+>]>+>>]<<<
<<]>[-]<-[>-<+++++]>--->>[<<[<+>>>+<<-]<[>+<-]>>>.[-]]++++++++++<[->-[
>+>>]>[+[-<+>]>+>>]<<<<<]>[-]<<[>+>>>+<<<<-]>>>>.[-]<<<[>>+<<-]>>.[-]<
<<<<-]<<<++++++++++.[-]<+]

Goes from 1 to 255

Turns out this actually does BuzzFizz. It gets FizzBuzz correct for %15, but it swaps %3 and %5. I may try to fix it, but for now my brain is officially F'ed

Fixed at cost of 30. Could have golfed it more with effort, but I have already wasted enough time on this.

"waste" is a strong word ...

This was a bit tricky to embed using the indentation so a gist:
Ruby, 4312 chars
https://gist.github.com/dzucconi/1f88a6dffa2f145f370f
eval("

                                                                                ".split(/\n/).map(&:size).pack("C*"))

How does this even work?

._. How this thing work...

"string of your program".unpack("C*").map { |x| " " * x }.join("\n")

Brainfuck, 708 characters
++++++++++[>++++++++++<-]>>++++++++++>->>>>>>>>>>>>>>>>-->+++++++[->++
++++++++<]>[->+>+>+>+<<<<]+++>>+++>>>++++++++[-<++++<++++<++++>>>]++++
+[-<++++<++++>>]>>-->++++++[->+++++++++++<]>[->+>+>+>+<<<<]+++++>>+>++
++++>++++++>++++++++[-<++++<++++<++++>>>]++++++[-<+++<+++<+++>>>]>>-->
---+[-<+]-<[+[->+]-<<->>>+>[-]++[-->++]-->+++[---++[--<++]---->>-<+>[+
+++[----<++++]--[>]++[-->++]--<]>++[--+[-<+]->>[-]+++++[---->++++]-->[
->+<]>>[.>]++[-->++]]-->+++]---+[-<+]->>-[+>>>+[-<+]->>>++++++++++<<[-
>+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>>[-]>>>++++++++++<[->-[>+>>]>[+[-<+>]>
+>>]<<<<<]>[-]>>[>++++++[-<++++++++>]<.<<+>+>[-]]<[<[->-<]++++++[->+++
+++++<]>.[-]]<<++++++[-<++++++++>]<.[-]<<[-<+>]+[-<+]->>]+[-]<<<.>>>+[
-<+]-<<]

Description of how it works is available in my Code Review question

Haskell - 147 142 138 characters
fi=zz.bu
bu=zz.(:).(++"zz")
[]#zz=zz;zz#__=zz
zZ%zz=zZ zz$zZ%zz
zz=(([[],[]]++).)
z=zipWith3(((#).).(++))(bu%"Fi")(fi%"Bu")$map show[1..]

The code is 19 characters longer than it needs to be, but I thought the aesthetics were worth it! I believe all three "objectives" are satisfied.
> take 20 z
["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Buzz","11","Fizz","13","14",
"FizzBuzz","16","17","Fizz","19","Buzz"]

Hi, I try to get to understand your code, but I am unable to run it! The function zZ' is applied to six arguments,     but its type (a0 -> b0 -> c0) -> [a0] -> [b0] -> [c0]'
has only three

And I, while being able to run it, only get ["1","2","3","4","5","6"...].

Fixed - The right version was still on my disk... must have mis-pasted the text long ago!

please specify how can it be shortened by 19 characters, or show the code. i am curious and i have no idea

There are 19 occurrances of 2 letter names: bu, fi, zz, and zZ. These could be shortened to one letter names.

, 33 chars / 92 bytes (noncompetitive)
ѨŃ(1,ṥ)ć⇀ᵖɘƃ႖סР깜 #ē($%3⅋4,$%5?4:8)⋎$⸩

Try it here (Firefox only).
This language is way too OP for restricted source challenges.

Javascript, 469 bytes
This was probably the most fun I've ever had.
z=0;_=(function(){b=0;window[0xA95ED.toString(36)]((function(){yay="&F bottles of beer on the wall, &F bottles of beer. Take one down, pass it around, &z Bottles of beer on the wall.";return atob("eisrOyAg") + "console.log(((function(y){if((y%0xf)==0){return [1,72,84,84,86,78,84,84]}else if(y%0b11==0){return [1,72,84,84]}else if(y%0b101==0){return [86,78,84,84]}else{b=1;return [y]}})(z).map(function(x){return b==0?yay[x]:x}) ).join(''))"})())});setInterval(_,1000);

Try it here

Dang, I just realized that the objective was to be short and hard to follow... Sorry :P

+1 Might have missed on the shortness, but at least you didn't have fizz buzz in there

Ruby - 165 characters
(1..100).each{|i|i%0xF==0? puts(["46697A7A42757A7A"].pack("H*")):i%(0xD-0xA)==0? puts(["46697A7A"].pack("H*")):i%(0xF-0xA)==0? puts(["42757A7A"].pack("H*")):puts(i)}

This was my first attempt at code golf.  I had a lot of fun.  =)

Perl 6 (52 bytes)
say "Fizz"x$_%%(2+1)~"Buzz"x$_%%(4+1)||$_ for 1..100

Let me put an explanation here. It's the worst rule abuse I've done in such task. I know what you are saying - there is obvious Fizz and Buzz here. But let's take a look at the rules.

To be considered obfuscated, it should satisfy at least one of the following:

This avoids 3, 5 and 15. Therefore, it's valid and really short solution.

C (237 209 characters)
#include<stdlib.h>
#define e printf
a=50358598,b=83916098,c=1862302330;_(m,n){return(m%((c&n)>>24))
||!(e(&n)|e(&c));}main(_);(*__[])(_)={main,exit};main(i){_(i,a)
&_(i,b)&&e("%i",i);e("\n");__[i>=100](++i);}

Though I'm not sure this conforms to the C standard :)
It works, though. On Linux using GCC, that is.

Scala, 295 characters
object F extends Application{var(f,i,z)=("",('z'/'z'),"FBiuzzzz");while(i<(-'b'+'u'+'z'/'z')*('¥'/'!')){if(i%(-'f'+'i'/('z'/'z'))==0)f+=z.sliding(1,2).mkString;if(i%((-'b'+'u'+'z'/'z')/('f'/'f'+'i'/'i'+'z'/'z'+'z'/'z'))==0)f+=z.drop(1).sliding(1,2).mkString;if(f=="")f+=i;println(f);i+=1;f="";}}

Python 3 - 338
import sys
def fibu():
        (F,I,B,U),i,u,z=sys._getframe(0).f_code.co_name,0xf,0xb,lambda x,y:x%((i//u)+(i^u))==u>>i if y>u else x%(((u<<(u>>2))&i)>>(u>>2))==i>>u
        A,RP = "",chr(ord(U)+((i//u)+(i^u)))*2
        for x in range(100):print(x if not (z(x,u)or z(x,i))else A.join((F+I+RP if z(x,u)else A,B+U+RP if z(x,i)else A)))
fibu()

This is my first golf. Not the shortest, but it's pretty ugly! None of the forbidden numbers or string literals. Firp, Burp!

Python - 157
from itertools import cycle as r
c=str.replace
[c(c(c(z+y,'x','fix'),'y','bux'),'x','zz').strip() or x for z,y,x in zip(r('  y'),r('    x'),range(1,101))]

Not quite the shortest, but I hope the reader will appreciate the pure functional style and extensibility to arbitrarily long counts.

 K, 155
{m:{x-y*x div y};s:{"c"$(10-!#x)+"i"$x};$[&/0=m[x]'(2+"I"$"c"$49;4+"I"$"c"$49);s"<`rs<pvw";0=m[x;2+"I"$"c"$49];s"<`rs";0=m[x;4+"I"$"c"$49];s"8lrs";x]}'!100

I could golf it quite a bit but I'd rather it be more obfuscated.

JavaScript 111 chars - no key numbers
a=b=c=0;while(a++<99)document.write((b>1?(b=0,"Fizz"):(b++,""))+(c==4?(c=0,"Buzz"):(c++,""))+(b*c?a:"")+"<br>")

C# - 218 characters
using System;class D{static void Main(){int l,i,O=1;l++;string c="zz",a="fi",b="bu";l++;l++;i=l;i++;i++;for(;O<101;O++)Console.WriteLine(((O%l)>0&&1>(O%i))?a+c:(1>(O%l)&&(O%i)>0)?b+c:(1>(O%l)&&1>(O%i))?a+c+b+c:O+"");}}

Could be shortened if I introduced other numbers like so: (210 characters total)
using System;class D{static void Main(){int l=1,i,O=1;string c="zz",a="fi",b="bu";l+=2;i=l;i+=2;for(;O<101;O++)Console.WriteLine(((O%l)>0&&1>(O%i))?a+c:(1>(O%l)&&(O%i)>0)?b+c:(1>(O%l)&&1>(O%i))?a+c+b+c:O+"");}}

Decided to remove the obvious word fizz and buzz and go for slightly more obfuscation. Second one is shorter than the first one but is slightly more direct on what's occurring in the addition.

This isn't exactly golfed, its about 120 lines.
I thought I'd do something that took advantage of all the fun potential for undefined behavior with C++ memory management.
#include <iostream>
#include <string>

using namespace std;

class Weh;
class HelloWorld;

class Weh
{
public:

    string value1;
    string value2;
    void (*method)(void * obj);

    Weh();

    string getV1();

    static void doNothing(void * obj);
};

class HelloWorld
{
public:
    static const int FOO = 1;
    static const int BAR = 2;
    static const int BAZ = 4;
    static const int WUG = 8;

    string hello;
    string world;
    void (*doHello)(HelloWorld * obj);

    HelloWorld();

    void * operator new(size_t size);

    void tower(int i);
    const char * doTower(int i, int j, int k);

    static void doHe1lo(HelloWorld * obj);
};

Weh::Weh()
{
    method = &doNothing;
}

void Weh::doNothing(void * obj)
{
    string s = ((Weh *) obj)->getV1();
    ((HelloWorld *) obj)->tower(1);
}

string Weh::getV1()
{
    value1[0] += 'h' - 'j' - 32;
    value1[1] += 'k' - 'g';
    value1[2] += 'u' - 'g';
    value1[3] = value1[2];
    value2 = value1 = value1.substr(0, 4);

    value2[0] += 'd' - 'h';
    value2[1] += 'w' - 'k';
    value2[2] = value1[2];
    value2[3] = value1[3];

    return "hello";
}

void * HelloWorld::operator new(size_t size)
{
    return (void *) new Weh;
}

HelloWorld::HelloWorld()
{
    hello = "hello";
    world = "world";
}

void HelloWorld::doHe1lo(HelloWorld * obj)
{
    cout << obj->hello << " " << obj->world << "!" << endl;
}

void HelloWorld::tower(int i)
{
    doTower(0, 0, i);
    tower(i + (FOO | BAR | BAZ | WUG));
}

const char * HelloWorld::doTower(int i, int j, int k)
{
    static const char * NOTHING = "";
    int hello = BAR;
    int world = BAZ;
    int helloworld = FOO | BAR | BAZ | WUG;

    if ((hello & i) && (world & j))
        cout << this->hello << this->world << endl;
    else if (hello & i)
    {
        cout << this->hello << endl;
        cout << doTower(0, j + 1, k + 1);
    }
    else if (world & j)
    {
        cout << this->world << endl;
        cout << doTower(i + 1, 0, k + 1);
    }
    else
    {
        cout << k << endl;
        cout << doTower(i + 1, j + 1, k + 1);
    }

    return NOTHING;
}

int main()
{
    HelloWorld * h = new HelloWorld;
    h->doHello(h);
}

Ruby - 89 chars
puts (0..99).map{|i|srand(1781773465)if(i%15==0);[i+1,"Fizz","Buzz","FizzBuzz"][rand(4)]}

I can't take credit for this piece of brilliance, but I couldn't leave this question without my favorite obfuscated implementation :)
The implementation above was written by David Brady and is from the fizzbuzz ruby gem. Here is the explanation from the source code:

Uses the fact that seed 1781773465 in Ruby's rand will generate the
  15-digit sequence that repeats in the FizzBuzz progression. The
  premise here is that we want to cleverly trick rand into delivering a
  predictable sequence. (It is interesting to note that we don't
  actually gain a reduction in information size. The 15-digit sequence
  can be encoded as bit pairs and stored in a 30-bit number. Since
  1781773465 requires 31 bits of storage, our cleverness has actually
  cost us a bit of storage efficiency. BUT THAT'S NOT THE POINT!

Ruby - 87 chars
puts (0..99).map{|i|srand(46308667)if(i%15==0);["FizzBuzz","Buzz",i+1,"Fizz"][rand(4)]}

Here's a different version which uses a shorter seed but the lookup table is in a different order. Here is the explanation from the source code:

The first implementation (89 chars) adheres to the specific ordering
  of 0=int, 1=Fizz, 2=Buzz, 3=FizzBuzz. It may be possible to find a
  smaller key if the ordering is changed. There are 24 possible
  permutations. If we assume  that the permutations are evenly
  distributed throughout 2*31 space, and about a 50% probability that
  this one is "about halfway through", then we can assume with a decent
  confidence (say 20-50%) that there is a key somewhere around 1.4e+9
  (below 2*28). It's not much gain but it DOES demonstrate leveraging
  rand's predefined sequence to "hide" 30 bits of information in less
  that 30 bits of space.
Result: The permutation [3,2,0,1] appears at seed 46308667, which can
  be stored in 26 bits.

very sweet, but does contain a literal "Fizz", "Buzz" etc so not valid according to the rules

Python, 1 line, 376 characters
pep8-E501 ignored. Only works in python3.
print(*((lambda x=x: ''.join(chr(c) for c in (102, 105)) + (2 * chr(122)) + ''.join(chr(c) for c in (98, 117)) + (2 * chr(122)) + '\n' if x % (30 >> 1) == 0 else ''.join(chr(c) for c in (102, 105)) + (2 * chr(122)) + '\n' if x % (6 >> 1) == 0 else ''.join(chr(c) for c in (98, 117)) + (2 * chr(122)) + '\n' if x % (10 >> 1) == 0 else str(x) + '\n')() for x in range(1, 101)))

Alternative Ruby (126 characters)
(1..100).map{|i|(x="\xF\3\5\1Rml6ekJ1eno=".unpack('C4m'))[-1]=~/(.*)(B.*)/
[*$~,i].zip(x).map{|o,d|i%d>0||(break $><<o<<?\n)}}

Short and obscure, just how we like it. The 3 and the 5 are actually in there but not as integer literals so I think that still counts.
Note that the this is the shortest Ruby version without literal 'Fizz', 'Buzz', 'FizzBuzz' on here.

Python 2 - 54 chars
i=0
while 1:i+=1;print'FizzBuzz'[i%~2&4:12&8+i%~4]or i

Python 3 - 56 chars
i=0
while 1:i+=1;print('FizzBuzz'[i%~2&4:12&8+i%~4]or i)

If you do not want 'FizzBuzz' to appear :
Python 2 - 58 chars
i=0
while 1:i+=1;print' zzuBzziF'[12&8+i%~2:i%~4&4:-1]or i

Python 3 - 60 chars
i=0
while 1:i+=1;print(' zzuBzziF'[12&8+i%~2:i%~4&4:-1]or i)

Or how to beat GolfScript with Python ;)

The first two seem to do nothing, since i=0 means the while loop is never entered.

Lol I used my test version, in which the condition is i<20.

But now it works :)

Shouldn't it stop at 100 according to the original FizzBuzz problem?

Squeak (4.4) Smalltalk 206 bytes
|f i zz b u z|z:=''.b:=28r1J8D0LK. 1to:100do:[:o|0<(f:=(i:=(zz:=b\\4)//2*4)+(u:=zz\\2*4))or:[z:=z,o].b:=zz<<28+(b//4).z:=z,((z first:f)replaceFrom:1to:f with:28r1A041FHQIC7EJI>>(4-i*u*2)startingAt:1),'
'].z

Or same algorithm with less explicit messages, same number of characters
|l f i zz b u z|z:=#[].b:=36rDEB30W. 1to:100do:[:o|0<(f:=(i:=(zz:=b\\4)//2)+(u:=zz\\2)*4)or:[z:=z,('',o)].b:=zz<<28+(b//4).l:=36r2JUQE92ONA>>(1-u*i*24).1to:f do:[:k|z:=z,{l-((l:=l>>6)-1<<6)}].z:=z,'
'].'',z

My apologizes to Alan Kay for what I did to Smalltalk.
Some of these hacks are portable across Smalltalk dialects, some would require a Squeak compatibility layer...
Note that if you execute in a Workspace, you can omit declarations |f i zz b u z| and gain 14 characters.
If we can afford 357 characters (315 with single letter vars), then it's better to avoid trivial #to:do: loop:
|fizz buzz if f fi zz b u bu z|f:=fizz:=buzz:=0.z:=#[].b:=814090528.if:=[:i|i=0or:[fi:=28.zz:=27<<7+i.u:=26.(fizz:=[zz=0or:[z:=z,{(u:=u//2)\\2+1+(zz+((fi:=fi//2)\\2+2-(zz:=zz//8)*8)*4)}.fizz value]])value]].(buzz:=[(f:=f+1)>100or:[(fi:=(zz:=b\\4)//2*17)+(bu:=zz\\2*40)>0or:[z:=z,('',f)].b:=zz<<28+(b//4).if value:fi;value:bu.z:=z,'
'.buzz value]])value.'',z

Haskell 226 bytes, including the whitespace for layout ;)
z=[fI$ (++)            \
(fi zz 1 "Fi" )        \
(fi zz 2 "Bu" )        \
:[show zz]  | zz<-[1..]]
fI (zZ:zz)  | zZ==[]   \
= concat zz | 1==1=zZ
fi zZ bu zz | zZ%bu=   \
(zz++"zz")  | 1==1=[]
bu%zz=mod bu (zz*2+1)==0

The 'real' code is 160 bytes and can be compressed, but loses fizz-buzz-ness then.
Run it (for nice output):
putStrLn (unwords (take 20 z ))

Output:
1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19 Buzz

Perl
use MIME::Base64;print map{map{(++$i,'Fizz','Buzz','FizzBuzz')[$_]."\n"}(3&ord,3&ord>>2,3&ord>>4,3&ord>>6)}split//,decode_base64"EAZJMIRBEgxhkARDGCTBEAZJMIRBEgxhkA"

One I made in 2009. It's pretty easy to figure out, though.
Edit: Darn, it uses "Fizz" and "Buzz!" :( I thought I changed that. Nevermind then.

C 216 bytes
#define t(b) putchar(p+=b);
main(p,v,c){p=70;for(v=c=1;v<=p*2-40&&!(c=0);++v){if(!(v%(p/23))){t(0)t(35)t(17)t(0)++c;}if(!(v%(p/(14+c*9)))){t(-56+!c*52)t(51)t(5)t(0);++c;}if(c){t(-112)p+=60;}else printf("%i\n",v);}}

PHP - 157 154 95 chars
<?$x="zz";for(;++$i<=100;){?> <?$j=$i%(4-1)^0?"":"Fi$x";$j.=$i%(4+1)^0?"":"Bu$x";echo$j?$j:$i;}

And no whitespace! Only one space!

Python, 180 chars
from random import*;seed(0);_,y=''.join(sample('zzzzuiFB',8)),5**2<<2
print chr(int(`y`[::2])).join(filter(bool,map(lambda z:(not z%(y>>5))*_[:1<<2:]+(1>z%5)*_[1<<2::],range(1,y))))

C Solution
    #include  <stdio.h>
    #define a b b b b b
    #define b c c c c c
    #define c d d d d d
   #define  h(k,s)k?s:""
  #define x !(n%('0'>>4))
  #define y !(n%('P'>>4))
  #define d if(100>=++n)\
printf("%s%s%s",h(x,"Fizz"\
),h(y,"Buzz"),h(x|y,"\n"));
int main(){static int n; a}

K
-1',/'$(+`fizz`buzz,,1+!100)@'&:'+(a,,~|/[a:100#'(001b;00001b)])

Here's a fun one in C. It can be shorter, but then it won't be as much fun!
#define i(bu,zz,fi) printf("?"[1]|""[0]?"fi":"%"#zz"\n",bu)
#define x(a,i,p) {-0xf##i&(3+5-1),{z(z,a,p,),""}}
#define z(b,f,z,l) #z#f""#b""#l#b
main(b){struct{char z;char*u[2];}u[]={x(i,d,f),x(u,b,b),{0}};for(b=1;b<'e';b++)
{int z=0;char f[3+5+1]={0};for(b;u[z].z;z++)strcat(f,u[z].u[!!(b%u[z].z)]);*f&&
i(f,s,3)||i(b,d,5);}}

JavaScript, 80 characters
for(i=0;i<100;a=++i%3,b=i%5,alert(i+"FizzBuzz".slice(t=a&&!b*4,t?8:!a*4+!b*4)));

Your code uses "FizzBuzz" which is disallowed by the rules.

Fatalize's comment isn't the full story: you could either remove the FizzBuzz, or the 3 and 5`, or you could use any of those "in a misleading way" (whatever that means).

Ok, I'll see what I can come up to in that sense. Thanks for exposing the rules, didn't paid attention to those on the first run.

C, 283 bytes
#include "stdio.h"
#include "string.h"
#define z 122
int main(){char f[]={70,105,z,z,0},b[]={66,117,z,z,0},i=1,B[z],g;for(i=1;i<=100;i++){g=0;if(i%3<1)strcpy(B,f),g=1;if(i%5<1){if(g>0)strcat(B,b);else if(g<1)strcpy(B,b),g=1;}if(g<1)printf("%d\n",i);else printf("%s\n",B);}return 0;}

Obscure? Maybe. Golfed? A little more so than it is obscure. Ugly? YES.

C 213 Bytes
int c=1,m,n,O,z='z';void main(){O=0;m=c%5-c%3;if(c>2){O=!m&&n?printf("Fiz%cBuz%c",z,z):O;O=m<0&&n+1?printf("Buz%c",z):O;O=m!=n&&m+1&&!O?printf("Fiz%c",z):O;}n=m;O?0:printf("%i",c);putchar(10);c++;if(c<101)main();}

Everything is based on counter % 5 - counter % 3.

C++ (478 Bytes)
It beats the previous C++ code easily.
#include<iostream>
#include<string>
using namespace std;int main() {string K = "FBiuzzzz";for (int i = 1; i <= 100; i++) {if (i % ((35 / 10)*(35 % 10))==0) {for (int j = 0; j < 8; j += 2)cout << K.at(j);for (int j = 1; j < 8; j += 2)cout << K.at(j);cout << endl;}else if (i % (35 / 10) == 0) {for (int j = 0; j < 8; j += 2)cout << K.at(j);cout << endl;}else if (i % (35 % 10) == 0) {for (int j = 1; j < 8; j += 2)cout << K.at(j);cout << endl;} else cout << i << endl;}return 0;}

Lol, I have made FBiuzzzz instead of FizzBuzz (Scrambling trick intensifies)

gs2, 1 byte
f

prints fizzbuzz, gs2 has a very simple function

JavaScript - 166 chars
Here's another JavaScript solution which uses an encoded for loop body to hide 3, 5, Fizz, and Buzz. It's relatively terse, but you can still kind of see what's going on.

for(i=0;++i<101;)console.log(eval(String.fromCharCode(...'286925333f27273a2746697a7a27292b286925353f27273a2742757a7a27297c7c69'.match(/../g).map(n=>parseInt(n,16)))))

For something a bit more interesting, we can encode all the programming logic in zero-width whitespace characters and have something that looks concise but is actually not at all. This is similar to dzuc's Ruby solution.

eval(''.split('').map(=>String.fromCharCode(.length)).join(''))

Personally, I like playing with fire.

Function('ಠ_ಠ',''.split('').map(ಠ_ಠ=>String.fromCharCode(ಠ_ಠ.length)).join(''))(100)

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/2.5/

authors: n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Sharing Inherited Land
You and your brother have inherited a rectanglar block of land. This block of land's corners are read in from stdio as TLX,TLY,TRX,TRY,BLX,BLY,BRX,BRY (all decimal numbers without units, T=Top, L=Left, B=Bottom, R=Right)
Unfortunately the city has seen fit to appropriate a small rectanglar section from inside your you newly aquired land. This appropriated land can be at any angle and in any position on your land. Its corners are read in from stdio as TLX,TLY,TRX,TRY,BLX,BLY,BRX,BRY (all decimal numbers without units).
You need to split this land evenly with your brother by building a fence. The fencing contractors can only build a single straight line fence. You need to supply them with the start and end co-ordinates which sit along the parameter of your property. These are written to stdio as SX,SY,EX,EY (all decimal numbers without units, S=Start, E=End)
The city has graciously agreed to allowed you to freely build the fence across their bit of appropriated property.
Provide a solution which can accept the 2 rectangle co-ordinates and return a correct solution which divides the property area equally for you and your brother.
visualized samples of potential input (white = your land, grey = city land):

{I'll insert the credit here after people have answered}

Math analyse with several simple integrals for finding extremus. So sad, I don't remember details (It's just one way to solve, on paper)

Looks like here are mentioned several ways to solve http://en.wikipedia.org/wiki/Optimization_%28mathematics%29

Please add a winning criterion.

C
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>

enum mode
{
    CORD_MODE_CONST = 1,
    CORD_MODE_SLOPE = 2,
};
typedef struct point {
    float x;
    float y;
} CORD;

typedef struct l {
    int mode;
    float m;
    float b;
}LINE;

typedef struct r {

    CORD topL;
    CORD botL;

    CORD topR;
    CORD botR;

    CORD midRight;
    CORD midBot;
    CORD midLeft;
    CORD midTop;

    CORD center;
    LINE vertLine;
    LINE horLine;

} RECTANGLE;

void findBorderIntersection(RECTANGLE * pR, LINE * p);
int isPointContained(RECTANGLE * pR, CORD * pC1);
float dotProduct(float y1, float y2, float x1, float x2);
void findCenterOfRetangle(RECTANGLE * pR);
void findIntersection(LINE * pL1, LINE * pL2, CORD *pInt);
void findMidPointOfLine(CORD * pC1, CORD * pC2, CORD * pMid);
void getLine(CORD * pC1, CORD * pC2, LINE * pLine );

void dumpCord(char * pS, CORD * pC)
{
    printf(" %s y:%f x:%f\n",pS,pC->y,pC->x);
}

int main()
{
    RECTANGLE yourLand;
    RECTANGLE cityLand;
    LINE  lineThroughCenter;

    memset(&yourLand,0x0, sizeof(RECTANGLE));
    memset(&cityLand,0x0, sizeof(RECTANGLE));

    scanf("%f%f%f%f%f%f%f%f",&(yourLand.topL.x),
                             &(yourLand.topL.y),
                             &(yourLand.topR.x),
                             &(yourLand.topR.y),
                             &(yourLand.botL.x),
                             &(yourLand.botL.y),
                             &(yourLand.botR.x),
                             &(yourLand.botR.y));

    scanf("%f%f%f%f%f%f%f%f",&(cityLand.topL.x),
                             &(cityLand.topL.y),
                             &(cityLand.topR.x),
                             &(cityLand.topR.y),
                             &(cityLand.botL.x),
                             &(cityLand.botL.y),
                             &(cityLand.botR.x),
                             &(cityLand.botR.y));

    /* Find center of your land */
    findCenterOfRetangle(&yourLand);

    /* Find center of city land */
    findCenterOfRetangle(&cityLand);

    /* Handle the case where the centers are right on top of each other */
    if((yourLand.center.x == cityLand.center.x) &&
     (yourLand.center.y == cityLand.center.y))
    {
        /* Find the line through center and the top border */
        getLine(&(yourLand.midTop),&(cityLand.center),&lineThroughCenter);
    }
    else
    {
        /* Find the line through center of both lands */
        getLine(&(yourLand.center),&(cityLand.center),&lineThroughCenter);
    }

    /* Find the border cords */
    findBorderIntersection(&(yourLand),&lineThroughCenter);

    return 0;
}
void findBorderIntersection(RECTANGLE * pR, LINE * p)
{
    LINE line;
    CORD c1;
    CORD c2;

    int bTop = 0;

    getLine(&(pR->topL), &(pR->topR),&line);

    /* Figure out if the the line goes through the top/bottom or right/left */
    if( p->m != line.m)
    {
          findIntersection(p,&line, &c1);
          bTop = isPointContained(pR,&c1);
    }

    if(bTop)
    {
        getLine(&(pR->botL), &(pR->botR),&line);
        findIntersection(p,&line, &c2);
    }
    else
    {
        getLine(&(pR->topL), &(pR->botL),&line);
        findIntersection(p,&line, &c1);

        getLine(&(pR->topR), &(pR->botR),&line);
        findIntersection(p,&line, &c2);
    }

    dumpCord("Border Cord1:",&c1);
    dumpCord("Border Cord2:",&c2);

}

int isPointContained(RECTANGLE * pR, CORD * pC1)
{
    float pointProduct1;
    float vectorProduct1;
    float pointProduct2;
    float vectorProduct2;

    vectorProduct1 = dotProduct((pR->topL.y - pR->botL.y),
                               (pR->topL.y - pR->botL.y),
                               (pR->topL.x - pR->botL.x),
                               (pR->topL.x - pR->botL.x));

    pointProduct1 = dotProduct((pC1->y - pR->botL.y),
                              (pR->topL.y - pR->botL.y),
                              (pC1->x - pR->botL.x),
                              (pR->topL.x - pR->botL.x));

    vectorProduct2 = dotProduct((pR->botR.y - pR->botL.y),
                               (pR->botR.y - pR->botL.y),
                               (pR->botR.x - pR->botL.x),
                               (pR->botR.x - pR->botL.x));

    pointProduct2 = dotProduct((pC1->y - pR->botL.y),
                              (pR->botR.y - pR->botL.y),
                              (pC1->x - pR->botL.x),
                              (pR->botR.x - pR->botL.x));

    if( (pointProduct1 <= vectorProduct1) &&
        (pointProduct1 >= 0) &&
        (pointProduct2 <= vectorProduct2) &&
        (pointProduct2 >= 0))
    {
        return 1;
    }

    return 0;

}
float dotProduct(float y1, float y2, float x1, float x2)
{
    return y1*y2 + x1*x2;
}

void findCenterOfRetangle(RECTANGLE * pR)
{
     /* Find the mid point of the left side */
    findMidPointOfLine(&(pR->topL), &(pR->botL), &(pR->midLeft));

     /* Find the mid point of the right side */
    findMidPointOfLine(&(pR->topR), &(pR->botR), &(pR->midRight));

    /* Get the line */
    getLine(&(pR->midLeft), &(pR->midRight), &(pR->horLine));

     /* Find the mid point of the top side */
    findMidPointOfLine(&(pR->topL), &(pR->topR), &(pR->midTop));

     /* Find the mid point of the bottom side */
    findMidPointOfLine(&(pR->botL), &(pR->botR), &(pR->midBot));

    /* Get the line */
    getLine(&(pR->midTop), &(pR->midBot), &(pR->vertLine));

    /* Find the center of the first rectangle */
    findIntersection(&(pR->horLine), &(pR->vertLine),&(pR->center));

}
void findIntersection(LINE * pL1, LINE * pL2, CORD *pInt)
{

    if(pL1->mode == CORD_MODE_CONST)
    {
        pInt->x = pL1->m;
        pInt->y = ((pL2->m * pInt->x) + pL2->b);
    }
    else if(pL2->mode == CORD_MODE_CONST)
    {
        pInt->x = pL2->m;
        pInt->y = ((pL1->m * pInt->x) + pL1->b);
    }
    else
    {
        pInt->x = (pL2->b - pL1->b) / (pL1->m - pL2->m);
        pInt->y = ((pL2->m * pInt->x) + pL2->b);
    }
}

void findMidPointOfLine(CORD * pC1, CORD * pC2, CORD * pMid)
{
    pMid->y = (pC1->y + pC2->y) / 2;
    pMid->x = (pC2->x + pC1->x) / 2;
}
void getLine(CORD * pC1, CORD * pC2, LINE * pLine )
{

    /* Find slope */
    if((pC1->x - pC2->x) == 0)
    {
        pLine->mode = CORD_MODE_CONST;
        pLine->m = pC1->x;
        pLine->b = 0;
    }
    else
    {
        pLine->mode = CORD_MODE_SLOPE;
        pLine->m = ((pC1->y - pC2->y) / (pC1->x - pC2->x));

        /* Find y inter. */
        pLine->b = pC1->y - (pLine->m * pC1->x);
    }
}

+1 Nice job. Especially with catching the same center edge case :)

Really neat, but seems you're missing bounds checks for the results, for example 0,0 6,0 0,4 6,4 with 2,0 3,0 2,1 3,1 gives a starting y of -7, outside of the land.

Yeah, I don't check for invalid data. I assume the order presented in the question is the only valid way to input data.

@Pemdas It's not invalid data, I've only formatted it like so to make it easier to read (for humans). Draw it out and take a look.

TLY is 0 BLY is 4...4 can not be below 0...well it can I suppose, but that is a limitation in my implementation.

Ah, I assumed a grid with top left as 0,0, should you be using a grid with bottom left of 0,0 this is a replot showing the same issue: 0,4 6,4 0,0 6,0 w/ 2,1 3,1 2,0 3,0

Good call...fixed ;)

Assuming the land you inherit is square to the grid, this should do the job in Java.
import java.io.*;

class Land {

    public static void main(String[] args) {

        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));

        double[] corners = new double[16];
        for(int i = 0; i < 16; i++) {
            try {
                corners[i] = Double.parseDouble(r.readLine());
            } catch (Exception e) {
                System.err.println("Error in input! Please try again.");
                i--;
            }
        }

        // Find mid point of own land
        double lx = (corners[0] + corners[6])/2;
        double ly = (corners[1] + corners[7])/2;
        System.out.println("Mid point of your land: "+ lx + ", " + ly);

        // Find mid point of city land
        double cx = (corners[8] + corners[14])/2;
        double cy = (corners[9] + corners[15])/2;
        System.out.println("Mid point of city land: "+ cx + ", " + cy);

        double sx, sy;

        // Check for div by 0
        if(cx-lx == 0) {
            sx = lx;
            sy = corners[1];
        } else {
            // Find gradient
            double m = (cy-ly)/(cx-lx);
            System.out.println("Gradient: " + m);
            // Find constant
            double c = ly - (m * lx);
            System.out.println("Constant: " + c);

            if((m*corners[0] + c) >= corners[1]) {
                sy = m*corners[0] + c;
                sx = corners[0];
            } else {
                // use where line crosses x axis
                sy = corners[1];
                sx = (sy - c) / m;
            }
        }

        // Apply the offsets to the lower corner
        double ex = corners[6] - (sx - corners[0]);
        double ey = corners[7] - (sy - corners[1]);

        System.out.println("Fence start: "+ sx + ", " + sy);
        System.out.println("Fence end  : "+ ex + ", " + ey);
    }

}

Edit: just to clarify this also assumes a grid where top left is 0,0.

Python 2.7
My thinking is:

Line should pass through the centre of the brothers' land to split the 'additive area' equally.
Line should pass through the centre of the city's land to split the 'subtractive area' equally.
Line will pass through 'opposite edges' of the brothers' land.
Whether this is on the left-right edges or top-bottom edges depends on in which 'diagonal quadrant' of the land the centre of the city's portion lies.

So:

find centres
find diagonal quadrant
find intersection points with edges

Code (Dense, huh? Only that pesky 'else' shorter than 70 chars! Not on purpose!):
cent = lambda p0,p1: {'x':(p0['x']+p1['x'])/2,'y':(p0['y']+p1['y'])/2}
dx = lambda p0,p1: p1['x']-p0['x']; dy = lambda p0,p1: p1['y']-p0['y']
dxdy=lambda p0,p1: 0 if (p0['x']==p1['x'] or p0['y']==p1['y']) else dx(p0,p1)/dy(p0,p1)
dydx=lambda p0,p1: 0 if (p0['x']==p1['x'] or p0['y']==p1['y']) else dy(p0,p1)/dx(p0,p1)
y_at_x = lambda p,lp0,lp1: lp0['y'] + (p['x']-lp0['x']) * dy(lp0,lp1)/dx(lp0,lp1)
print "input brothers' land TLX,TLY,TRX,TRY,BLX,BLY,BRX,BRY:"; land=input()
print 'input city land TLX,TLY,TRX,TRY,BLX,BLY,BRX,BRY:'; city=input()
land_cent = cent({'x':land[0],'y':land[1]},{'x':land[6],'y':land[07]})
city_cent = cent({'x':city[0],'y':city[1]},{'x':city[6],'y':city[7]})
in_half_tr = y_at_x(city_cent,{'x':land[0],'y':land[1]},{'x':land[6],'y':land[7]}) < city_cent['y']
in_half_br = y_at_x(city_cent,{'x':land[2],'y':land[3]},{'x':land[4],'y':land[5]}) < city_cent['y']
if in_half_tr ^ in_half_br # left or right = top-right XOR bottom-right
  sp0 = {'x': land[0], 'y': land_cent['y'] - (land_cent['x']-land[0])*dydx(city_cent,land_cent)}
  sp1 = {'x': land[2], 'y': land_cent['y'] - (land_cent['x']-land[2])*dydx(city_cent,land_cent)}
else:
  sp0 = {'x': land_cent['x'] - (land_cent['y']-land[1])*dxdy(city_cent,land_cent), 'y': land[1]}
  sp1 = {'x': land_cent['x'] - (land_cent['y']-land[5])*dxdy(city_cent,land_cent), 'y': land[5]}
print "splitting line from: (%s, %s) to (%s, %s)" % (sp0['x'], sp0['y'], sp1['x'], sp1['y'])

Seems to work for some test cases:
input brothers' land TLX,TLY,TRX,TRY,BLX,BLY,BRX,BRY:
0.0,0.0,4.0,0.0,0.0,4.0,4.0,4.0
input city land TLX,TLY,TRX,TRY,BLX,BLY,BRX,BRY:
1.0,0.0,3.0,0.0,1.0,1.0,3.0,1.0
splitting line from: (2.0, 0.0) to (2.0, 4.0)

And:
input brothers' land TLX,TLY,TRX,TRY,BLX,BLY,BRX,BRY:
0.0,0.0,4.0,0.0,0.0,4.0,4.0,4.0
input city land TLX,TLY,TRX,TRY,BLX,BLY,BRX,BRY:
0.0,0.0,1.0,0.0,0.0,1.0,1.0,1.0
splitting line from: (0.0, 0.0) to (4.0, 4.0)

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/2.5/


text:
Sum of primes between given range
Write the shortest code for finding the sum of primes between \$a\$ and \$b\$ (inclusive).
Input

\$a\$ and \$b\$ can be taken from command line or stdin (space seperated)
Assume \$1 \le a \le b \le 10^8\$

Output
Just print the sum with a newline character.
Bonus Points

If the program accepts multiple ranges (print one sum on each line), you get extra points. :)

The upper limit is too big to allow many interesting solutions (if they have to complete in reasonable time, at least).

@hallvabo You find inefficient solutions interesting?

@hallvabo, That's ok. I don't think anyone minds an ineffcient solution. If other's object, i'll be more than happy to lower the limit

Just made and ran a not very optimised or concise version of the program in C#, using 1 to 10^8. Assuming my algorithm's correct, it ran in under 1m30s, and didn't overflow from a long. Seems like a fine upper limit to me!

A quick easy check: sum of primes between 1 and 100 = 1060.

@Matthew Read, You find inefficient solutions interesting? - you didn't specify effectiveness, so either specify, or decrease upper limit, or we will decrease it in our solutions.

@st0le So seperated by spaces would be something like 2 3 5 and that would be ranges 2 3 and 3 5?

@jamylak, you can assume the numbers will always appear in pairs.

@st0le Ahh ok I will change my solution

J,41 32 19 characters:
Update
(simple sieve)
g=:+/@(*1&p:)@-.&i.

e.g.
100 g 1
1060
250000x g 48
2623030823

Previous
h=:3 :'+/p:i.(_1 p:>:y)'
f=:-&h<:

eg:
100 f 1
1060

Mathematica 7 (31 chars in plain text)
If PARI/GP solution allowed, then:
Plus@@Select[Range[a,b],PrimeQ]

What's your point? PARI/GP and Mathematica are fine programming languages.

@Eelvex, no, they break one of golf rules: using built-in specific highlevel functions.

I don't think there is such a rule. It's still an open matter when to use highlevel functions. See for ex. this meta question

28 chars Range[a,b]~Select~PrimeQ//Tr.

C#, 294 characters
using System;class P{static void Main(){int a=int.Parse(Console.ReadLine()),b=int.Parse(Console.ReadLine());long t=0;for(int i=a;i<=b;i++)if(p(i))t+=i;Console.WriteLine(t);}static bool p(int n){if((n%2<1&&n!=2)||n<2)return 0>1;for(int i=3;i<=Math.Sqrt(n);i+=2)if(n%i==0)return 0>1;return 1>0;}}

You can make all your ints long and save a few characters: long a=...,b=...,t=0,i=a;for(;i<=b;i++). This gets it to 288 chars. You can also let p return a long and just return either 0 or n and shorten the loop to t+=p(i). 277 chars, then.

C, 117 bytes
main(a,b,s,j){
s=0,scanf("%d%d",&a,&b);
for(a+=a==1;a<=b;a++)
for(s+=a,j=2;j<a;)
s-=a%j++?0:(j=a);
printf("%d",s);
}

C#, 183 characters
using System;class P{static void Main(string[] a){long s=0,i=Math.Max(int.Parse(a[0]),2),j;for(;i<=int.Parse(a[1]);s+=i++)for(j=2;j<i;)if(i%j++==0){s-=i;break;}Console.WriteLine(s);}}

This would be much shorter if it didn't have to check for 1, or if there was a better way to... In a more readable format:
using System;
class P
{
    static void Main(string[] a)
    {
        long s = 0,
             i = Math.Max(int.Parse(a[0]),2),
             j;

        for (; i <= int.Parse(a[1]);s+=i++)
            for (j = 2; j < i; )
                if (i % j++ == 0)
                {
                    s -= i;
                    break;
                }

        Console.WriteLine(s);
    }
}

I like how short this is, but I wonder how inefficient it would be when calculating up to 10^8!

True, but efficiency wasn't in the rules!

You know the compiler defaults numerics to 0 right? That'ld save you a couple more chars in there

Gives error when compiled without it

...because it is never assigned before it is used (via s -= i; because thats just syntactic sugar for s = s - i; which tries to access s before setting it)

@jcolebrand, that's only true of fields, local variables have to be initialized.

You can save a character by using string[]ain the Main signature. Antother two by omitting the call to Math.Max and instead using int i=int.Parse(a[0]);i=2<i?i:2;. The latter can even be pulled into the for header to save another char for the ;.

PARI/GP, 44 characters
sum(x=nextprime(a),precprime(b),x*isprime(x))

Shouldn't down voters give a reason for their -1?

The downvote was probably for using built-ins.

BASH Shell, 47 Characters
seq 1 100|factor|awk 'NF==2{s+=$2}END{print s}'

Edit: Just realized the sum overflows and is coerced as a double.
52 50 Characters
Here's a bit longer solution, but handles overflows aswell
seq 1 100|factor|awk NF==2{print\$2}|paste -sd+|bc

tr is shorter than paste, and you can remove the single quotes (escape the $).

@Nabb, will fix it as soon as i get my hands on a *nix box, or you could do the honours.

@Nabb, can't get it to work, tr adds a trailing '+' at the end, fixing it will take more chars.

Ah, missed that. Although I think you can still change to awk NF==2{print\$2} to save a byte on the longer solution (we won't accidentally run into brace expansion because there are no commas or ..s).

@Nabb, you're right. Done :)

@st0le : what do you mean coerced ?  jot - 3 100000000 2 | mawk2 '(__=$NF)<(_+=_^=___)*++_ || __%_*/[1379]$/' | gfactor | pvE0 | mawk2 'BEGIN{__=_+=++_}{_+=$(NF=__==NF)}END{print _}' :::::::::::::::::::: in0:  530MiB 0:00:12 [41.1MiB/s] [41.1MiB/s] [ <=> ] ::::::::::::::::::::::::
279209790387276. If you skip the last 8-digit prime the sum it outputs is 279209690387287 - no truncation, "double coercion", or loss of precision at all

Haskell (80)
c=u[2..];u(p:xs)=p:u[x|x<-xs,x`mod`p>0];s a b=(sum.filter(>=a).takeWhile(<=b))c

s 1 100 == 1060

This is code-golf! Why do you use such long names for your stuff?

It's hard to find shorter names than c, u, s...  The rest is language standard library.

Perl, 62 chars
<>=~/\d+/;map$s+=$_*(1x$_)!~/^1$|(^11+)\1+$/,$&..$';print$s,$/

This one uses the prime number regex.

Ruby 1.9, 63 chars
require'prime';p=->a,b{Prime.each(b).select{|x|x>a}.inject(:+)}

Use like this
p[1,100] #=> 1060

Using the Prime class feels like cheating, but since the Mathematica solutions used built-in prime functions...

APL (25 characters)
+/((R≥⎕)^~R∊R∘.×R)/R←1↓⍳⎕

This is a modification of a well-known idiom (see this page for an explanation) for generating a list of primes in APL.
Example:
      +/((R≥⎕)^~R∊R∘.×R)/R←1↓⍳⎕
⎕:
      100
⎕:
      1
1060

Normal Task (Python 3): 95 chars
a,b=map(int,input().split())
r=range
print(sum(1%i*all(i%j for j in r(2,i))*i for i in r(a,b+1)))

Bonus Task (Python 3): 119 chars
L=iter(map(int,input().split()))
r=range
for a,b in zip(L,L):print(sum(1%i*all(i%j for j in r(2,i))*i for i in r(a,b+1)))

R, 57 characters
a=scan();b=a[1]:a[2];sum(b[rowSums(!outer(b,b,`%%`))==2])

Is specifying n=2 necessary in scan()? If the input is standard, is there a problem with omitting the argument and assuming an extra  is required?

No actually you're right I could have done without. It was purely for aesthetic reasons (since i knew my code wasn't the shortest anyway :) )

Well, +1 from me just the same, as it's definitely not the longest.

Pari/GP (24 characters)
s=0;forprime(i=a,b,s+=i)

Like some other solutions, this doesn't strictly meet the requirements, as a and b aren't read from stdin or the command line.  I thought it was a nice alternative to the other Pari/GP and Mathematica solutions however.

+1: This is the way I'd actually do it, even without golfing.

Japt, 7 bytes
òV fj x

Try it here.

Welcome to Japt :)

@Shaggy I originally tried to find a "prime range" builtin in Japt, but then decided to accept the challenge :p

Given how many challenges there are related to primes, a shortcut for fj<space> could be handy.

05AB1E, 5 bytes
ŸDp*O

Try it online!
Ÿ      Push the list [a, ..., b]
 D     Push a duplicate of that list
  p    Replace primes with 1 and everything else with 0
   *   Element-wise multiply the two lists [1*0, 2*1, 3*1, 4*0, ...]
    O  Sum of the final list of primes

✓ I didn't think of using p*

More boring solution with filter: Ÿʒp}O

C (clang), 164 138 122 bytes
i,x,y,z;main(f){for(scanf("%d %d",&x,&y);x<y;z+=x++*!f)if(f=0,x<2)++x;else for(i=2;x/2/i&&!(f|=x%i++<1););printf("%i",z);}

Try it online!
Original code from Programiz. Just modified the code to reduce bytes. Yes, I'm terrible at this.
Code changed thanks to Pedro Maimere, byte count didn't change. Thanks to ceilingcat for golfing 26 bytes, and another 16 bytes.

As is, your code is not adding y, if prime. You have to use while(x<=y) instead, adding one byte. On the other side, you can omit one space here: "%d %d".Try it online!

Pip, 19 17 bytes
$+Y1=0N_%,_FIa\,b

Attempt This Online!
-2 thanks to @DLosc
Uses DLosc's answer to the prime checker challenge
Explanation
$+Y1=0N_%,_FIa\,b  ; Input on command line
              \,   ; Inclusive range between
             a  b  ; The two inputs
           FI      ; Filtered by
   1=0N_%,_        ; Is prime (see linked answer)
$+                 ; Sum the resulting list

Old:
$+Y{1=0Na%,a}FIa,Ub  ; Input on command line
                ,    ; Range between
               a     ; The first input
                 Ub  ; To the second input incremented
             FI      ; Filtered by
   {1=0Na%,a}        ; Is prime (see linked answer)
$+Y                  ; Sum the resulting list

17 bytes

@DLosc thanks, updated

"see linked answer" yet there's no linked answer :(

@AidenChow sorry, I removed the link

Regex  (ECMAScriptRME / Perl / PCRE), 32 bytes
^(x*),x*(?=\1)(?!(xx+)\2+$)x\Bx*

Takes its input in unary, as two strings of x characters whose lengths represent the numbers, joined by a , delimiter, specifying an inclusive range. Returns its output as the number of ways the regex can match. (The rabbit emoji indicates this output method.)
Try it online! / Attempt This Online! - Perl
Try it online! - PCRE1
Try it online! / Attempt This Online! - PCRE2
Try it on replit.com! - RegexMathEngine, in ECMAScript mode
^              # Anchor to start
(x*)           # \1 = lower end of range
,              # Skip over delimiter
x*             # tail += {any number, including zero}
(?=\1)         # Assert that tail ≥ \1
(?!(xx+)\2+$)  # Assert that tail is not composite (i.e., tail is prime or is < 2)
x\Bx*          # if tail ≥ 2, add tail to the number of possible matches; this is
               # equivalent to "(?=xx)x+"

Regex (.NET), 32 bytes
x(x*),((?=(xx+)\3+$|(x)+)x\B)*\1

Returns its output as the capture count of group \4.
Try it online!
                   # No need to anchor, as this regex will always match
x(x*)              # \1 = {lower end of range} - 1
                   # This takes advantage of the input specification allowing
                   # us to assume it to be ≥ 1.
,                  # Skip over delimiter; tail = upper end of range
(
    (?=            # Lookahead - is atomic (the first match found is final)
        (xx+)\3+$  # Match if tail is composite (i.e., isn't prime and is ≥ 2)
    |          # or...
        (x)+       # Push {tail} captures onto the Group 4 stack, i.e. add
                   # {tail} to the return value.
    )
    x              # tail -= 1
    \B             # Assert tail > 0
)*                 # Iterate the above as many times as possible (can be zero)
\1                 # Assert tail ≥ \1

Common Lisp, 107 chars
(flet((p(i)(loop for j from 2 below i never (= (mod i j) 0))))(loop for x from(read)to(read)when(p x)sum x))

only works for starting points \$\ge 1\$

Python 3.1(153 chars):
from sys import*
p=[]
for i in range(int(argv[1]),int(argv[2])):
 r=1
 for j in range(2,int(argv[2])):
  if i%j==0and i!=j:r=0
 if r:p+=[i]
print(sum(p))

from sys import* 2. r=True -> r=1 (and respectively 0 for False) 3. if i%j==0and i!=j:r=0 4. if r:p+=[i] 5. print(sum(p)) (replaces last 4 lines)

You can use input() to be shorter. Also, can you use if i%j<1and instead?

In Q (95):
d:{sum s:{if[2=x;:x];if[1=x;:0];$[0=x mod 2;0;0=min x mod 2+til floor sqrt x;0;x]}each x+til y}

Sample Usage:
q)d[1;100]
1060

Factor -> 98
:: s ( a b -- n )
:: i ( n -- ? )
n 1 - 2 [a,b] [ n swap mod 0 > ] all? ;
a b [a,b] [ i ] filter sum ;

Output:
( scratchpad ) 100 1000 s

--- Data stack:
75067

C#, 302 bytes
using System;namespace X{class B{static void Main(){long x=long.Parse(Console.ReadLine()),y=long.Parse(Console.ReadLine()),r=0;for(long i=x;i<=y;i++){if(I(i)){r+=i;}}Console.WriteLine(r);}static bool I(long n){bool b=true;if(n==1){b=false;}for(long i=2;i<n;++i){if(n%i==0){b=false;break;}}return b;}}}

R, 85 characters
x=scan(nmax=2);sum(sapply(x[1]:x[2],function(n)if(n==2||all(n %% 2:(n-1)))n else 0))
Extremely inefficient! I'm pretty sure it takes O(n^2) time. It might give warnings about coercing a double to a logical.
Deobfuscated:
x <- scan(nmax=2)
start <- x[1]
end <- x[2]

#this function returns n if n is prime, otherwise it returns 0.
return.prime <- function(n) {
  # if n is 2, n is prime. Otherwise, if, for each number y between 2 and n, n mod y is 0, then n must be prime
  is.prime <- n==2 || all(n%% 2:(n-1))
  if (is.prime)
    n
  else
    0
}
primes <- sapply(start:end, return.prime)
sum(primes)

Java 8, 239 237 74 73 bytes
a->b->{long r=0,t;for(;a<=b;r-=b--==t?~b:0)for(t=1;b%++t%b>0;);return r;}

-1 byte thanks to @ceilingcat
Try it online.
Explanation:
a->b->{              // Method with two Long parameters & Long return-type
  long r=0,          //  Result-sum, starting at 0
       t;            //  Temp-long
  for(;a<=b          //  Loop as long as `a` is still smaller than or equal to `b`:
      ;              //    After every iteration:
       r-=           //     Decrease the result-sum by:
          b--==t?    //      If `b` is equal to `t` (which means `b` is a prime):
                     //      (and decrease `b` by 1 afterwards with `b--`)
           ~b        //       Decrease the result-sum by `-b-1`
                     //       (aka Increase the result-sum by `b+1`,
                     //        where `+1` is to account for the earlier `b--`)
          :          //      Else:
           0)        //       Leave `r` the same by decreasing with 0
    for(t=1;         //   (Re)set `t` to 1
        b%++t%b>0;); //   Increase `t` by 1 first with `++t` every iteration,
                     //   and loop as long as `b` is NOT divisible by `t`,
                     //   and `b` is NOT 1 (with the second `%b`)
  return r;}         //  After the nested loop, return the result-sum

Jelly, 3 bytes
æRS

Try it online!

Desmos, 124 50 bytes
f(a,b)=∑_{n=a}^bnsgn((n-1)∏_{k=3}^nmod(n,k-1))

Try it on Desmos!
I had to waste 23 bytes just for the edge case of 0 and 1(-\left\{n<2:1,0\right\}). I feel like this could definitely be golfed further, but I'm not that skilled at Desmos. I especially think that the edge cases 0 and 1 could be handled a lot better than what I'm doing currently.
To think I've come so far... just a mere 2.5 years ago I was still a complete noob at Desmos golfing. Now, coming back to this answer 2.5 years later, there are so many golfs that I can spot. Shifting the bounds to remove the curly brackets, better ways to deal with the n=1 edge case, and some other tiny golfs, resulted in an over 50% reduction in my original code. Truly amazing stuff.
Explanation
I will explain each sub-expression a little out of order from the actual code, but I feel that this is the best way to understand what the code is doing.
∑_{n=a}^b: Summation from n=a to b. This will iterate through all integers between a and b inclusive.
∏_{k=3}^nmod(n,k-1): This takes the product of k=3 to n of mod(n,k-1)which essentially tests all the possible divisors between k=2 and n-1, and checks if n is divisible by k with mod(n,k) (it is mod(n,k-1) in the actual product, which will be explained further below). If n is composite then at least one value of k will make the mod expression equal to 0, making the entire product equal to 0. Otherwise, if n is a prime, then the product would be a positive integer. The reason why the product goes from k=3 to n instead of the more intuitive k=2 to n-1 is because if the upper bound is represented by more than one character, then curly brackets are required to group the characters together. In other words, a product from k=2 to n-1 would be ∏_{k=2}^{n-1}, which is four more bytes than ∏_{k=3}^n. But because we have shifted the bounds of the product up by one, we will need to subtract one from all instances of k in order to compensate for the shift. Hence, we have k-1 instead of k in the mod expression. This adds two bytes to our total code length, resulting in a net -2 bytes from doing this bound shifting. Now, because the bounds start from k=3, what happens if n=1 or 2? When the upper bound is lower than the lower bound, then the product will default to a value of 1. This is an issue for the n=1 case, which will result in the product being a positive integer (specifically 1), but that is undesirable because a positive integer implies that n=1 is a prime when in reality it isn't a prime. But there is a way to easily fix this...
(n-1): This expression is solely to deal with the n=1 case. When n=1, n-1 is 0 which causes the entire product to equal 0. For any other positive value, n-1 would simply be a positive integer and not affect the overall sign of the product. Note that this fix only works for testing primality for positive integers, but this is okay for our code because the problem specifies that a and b can be assumed to be at least 1. To deal with the n=0 case as well, something like 0^{0^{n-1}} would probably work.
nsgn( ... ): This takes n and multiplies it by the sign (sgn in the code) of the entire product expression. Remember that if the inside expression is a positive integer, then it is a prime; otherwise, it is composite. By taking the sign of the resulting integer, we will get 1 if n is prime and 0 if n is composite. Multiplying that by n will give n and 0 for the respective possibilities.
Now considering that we are taking a summation from n=a to b, this will essentially add n to the total sum if n is a prime, but it won't contribute to the sum if n is a composite. In other words, it takes the sum of all integers between n=a and b which are prime. With that, we are done.

Factor + math.primes math.unicode, 32 23 bytes
[ primes-between Σ . ]

-9 bytes thanks to chunes!
Try it online!

prime? and Σ are not available by default, so you need to change the header to "Factor + math.primes math.unicode" like this.

Thank you, @Bubbler I changed the header of my answers :)

primes-between is shorter than [a,b] [ prime? ] filter.

Thunno 2 S, 3 bytes
IœP

Explanation
IœP  # Implicit input
I    # Inclusive range, [a..b]
 œ   # Filtered by:
  P  #  Primality
     # Implicit output of sum (S flag)

Screenshot

Perl, 103 chars
while(<>){($a,$b)=split/ /;for($a..$b){next if$_==1;for$n(2..$_-1){$_=0if$_%$n==0}$t+=$_;}print"$t\n";}

It'll accept multiple space separated lines and give the answer for each :D

Python 3: 99 chars

l,h=map(int,input().split())
print(sum(p for p in range(l,h+1) if all(p%i for i in range(2,p)))-1)

This is not inclusive.

As noted by jamylak, this is not an inclusive range (try inputs 2 23), and is therefore invalid per the challenge spec. As so, I’ve flagged your answer for deletion.

I am removing this answer as per our policy on handling invalid submissions. Please feel free to edit this solution so it's valid and flag it for undeletion.

Whoever reflagged this for deletion, it was undeleted after being edited. I'm marking as "Looks OK", let me know if it's still invalid.

Mathematica, 27
Predefined a and b:
a~Range~b~Select~PrimeQ//Tr

As a function (also 27):
Tr[Range@##~Select~PrimeQ]&

Python 3: 86 chars
a,b=map(int,input().split())
P=k=1
s=0
while k<=b:s+=P%k*k*(k>=a);P*=k*k;k+=1
print(s)

Uses the factorial trick with Wilson's Theorem to check whether k is prime. P%k is 1 if k is prime and 0 otherwise. If it is prime, k is added to the running sum s.

Python - 194
File fsoe-sum.py:
S,E=input()
L={}
n=2
s=0
while n<=E:
        try:
                P=L[n];del L[n]
        except:
                P=[n]
                if S<=n: s+=n
        for p in P:
                m=n+p
                try:
                        if p not in L[m]:L[m].append(p)
                except:
                        L[m] = [p]
        n+=1
print s

Filesize is 194 bytes when using tabs to indent and no final newline.
Not the shortest pythonish solution but do you see the enbedded sieve? ;-)
Run:
$ python fsoe-sum.py
1,1000000
37550402023
$ python fsoe-sum.py
1,2000000
142913828922
$ python fsoe-sum.py
1000001,2000000
105363426899
$ python -c 'print 142913828922-37550402023'
105363426899

Perl, 94
my$s;map{my($a,$b)=($_,0);for(2..$a-1){$a%$_==0&&$b++}$b or$s+=$a}($ARGV[0]..$ARGV[1]);print$s

This takes input from the command line. It doesn't use regex.

GolfScript, 27 24 bytes
~,>{:x,{)x\%!},,2=},{+}*

This is based off of @w0lf's prime number algorithm.

Could you please add a "how it works"?

Haskell, 47 44 bytes
a!b=sum[x|x<-[a..b],all((<)0.mod x)[2..x-1]]

SEJPM helped me save 3 bytes!

44 bytes: a!b=sum[x|x<-[a..b],all((<)0.mod x)[2..x-1]] (using all instead of and)

Fails for 1!3 (gives 6 instead of 5)..

a?b=sum[n|n<-[a..b],n>1,all((>0).mod n)[2..n-1]], works for 1?3

Ruby, 60 bytes
require'prime';p=->a,b{eval Prime.each(b).reject{|x|x<a}*?+}

Usage
puts p[*gets.split.map(&:to_i)]

Inputs & Outputs
2 10     #=> 10
3 10     #=> 8
100 1000 #=> 75067

Casio-Basic, 42 bytes
sum(seq(piecewise(isPrime(x),x,0),x,a,b

Uses a hybrid/piecewise function that returns the number if it's prime, otherwise return 0. seq runs this over the range a to b, then sum adds it all up.
39 bytes for the function, 3 bytes to enter a,b as parameters.

Add++, 10 bytes
L,d@ßrÞP¦+

Try it online!
How it works
D,f,@@,		; Define a dyadic function, f
		; Example arguments:	[2 23]
	d	; Duplicate;	STACK = [2 23 23]
	@	; Reverse;	STACK = [23 23 2]
	ßr	; Range;	STACK = [23 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22]
	Þ	; Filter on:
	  P	;  Primality	STACK = [23 2 3 5 7 11 13 17 19]
	¦+	; Sum;		STACK = [100]
		; Implicitly return top of stack

APL(NARS), 11 chars, 22 bytes
{+/⍵/⍨0π¨⍵}

test one range:
{+/⍵/⍨0π¨⍵}  1..23
  100
{+/⍵/⍨0π¨⍵}  1..22
  77
{+/⍵/⍨0π¨⍵}1..1
  0

test two ranges:
{+/⍵/⍨0π¨⍵}¨(1..22)(1..23)
  77 100

Python 3: 259 characters
This is a longer solution, but it's more efficient than the one-liner I first posted.
import itertools as i
l,h=map(int,input().split())
F=lambda p:lambda x:x%p
def S(s):
 while 1:
  yield (p:=next(s),s:=filter(F(p),s) if p*p<=h else s)[0]
P=lambda:(yield from S(i.count(2)))
print(sum(i.takewhile(lambda e:e<=h,i.dropwhile(lambda e:e<l,P()))))

Whispers v3, 69 bytes
> Input
> Input
>> 1…2
>> L’
>> Select∧ 4 3
>> ∑5
>> Output 6

Try it online!
simply makes an inclusive range and filters it, then sums it.

Python 2, 82 bytes
for i in range(input(),input()+1):P=n=1;exec'P*=n*n;n+=1;'*~-i;exec P%n*'print;'*i

Try it online! Outputs in unary using a newline as a tally mark.
for i in range(input(),input()+1):P=n=1;exec'...'*~-i;exec P%n*'...'*i  # trimmed program
for   in                         :     ;             ;                  # for...
    i                                                                   # variable...
for   in                         :     ;             ;                  # in...
         range(       ,         )                                       # [...
               input()                                                  # input...
         range(                 )                                       # , ...,
                       input()                                          # input...
                              +                                         # plus...
                               1                                        # literal...
         range(                 )                                       # ]...
                                     =                                  # set...
                                    n                                   # variable...
                                     =                                  # to...
                                      1                                 # literal
                                   =                                    # set...
                                  P                                     # variable...
                                   =                                    # to...
                                    n                                   # variable
                                        exec                            # execute...
                                            '...'                       # literal...
                                                 *                      # repeated...
                                                  ~                     # negative...
                                                   -                    # negative...
                                                    i                   # variable...
                                                  ~                     # minus 1...
                                                 *                      # times...
                                        exec                            # as Python code
                                                      exec              # execute...
                                                               '...'    # literal...
                                                              *         # repeated...
                                                           P            # variable...
                                                            %           # modulo...
                                                             n          # variable...
                                                              *         # times...
                                                                    *   # repeated...
                                                                     i  # variable...
                                                                    *   # times...
                                                      exec              # as Python code

====================

P*=n*n;n+=1;  # full program
 *=           # set...
P             # variable...
 *=           # to...
P             # variable...
 *=           # multiplied by...
   n          # variable...
    *         # multiplied by...
     n        # variable
        +=    # set...
       n      # variable...
        +=    # to...
          1   # literal...
        +=    # added to...
       n      # variable

====================

print;  # full program
print   # output nothing with a trailing newline

Factor + math.primes, 37 bytes
: f ( x y -- n ) primes-between sum ;

Try it online!

Brachylog, 5 bytes
⟦₂ṗˢ+

Try it online!
Explanation
⟦₂       Range from the 2 numbers in the Input
  ṗˢ     Select all primes
    +    Sum

Stax, 8 bytes
Φ└♪Y╓U↨M

Run and debug it
This is a packed stax program which unpacks to the following 10 bytes:
^|r{|p}f|+

Run and debug it
^|r{|p}f|+ # takes input a,b
^          # increment b
 |r        # range from a..b+1
   {  }f   # filter by
    |p     # is prime?
        |+ # sum

CJam, 11 bytes
),\>{mp},:+

Try it online!
Essentially a port of my Stax answer
Explanation
),\>{mp},:+ # function taking a,b
)           # increment b
 ,          # range 0..b+1
  \         # swap to put a on top of stack
   >        # drop a elements from the range 0..b+1, essentially making it range(a,b+1)
    {  },   # filter by
     mp     # primality
         :+ # sum

Arturo, 38 36 bytes
print∑select..loop arg=>do=>prime?

print         ; print
∑             ; sum
select        ; select certain items from a block
..            ; range
loop arg=>do  ; eval each command line argument and place on stack
=>prime?      ; are they prime? (select)

Thunno, \$ 7 \log_{256}(96) \approx \$ 5.76 bytes
1+:gNkS

Attempt This Online!
Takes \$ b \$ first, then \$ a \$
Explanation
1+:gNkS  # Implicit input, b then a
1+       # Pop b and push b+1
  :      # Pop both and push [a..b+1)
   gNk   # Filter for primes only
      S  # Sum the resulting list

Vyxal s, 20 bits1, 2.5 bytes
ṡ~æ

Try it Online!
Somehow, I never noticed the existing answer is actually invalid.
Explained
ṡ~æ
ṡ    # Range [a, b]
 ~æ  # Filtered to only contain primes
# Summed by the s flag

SAS, 163 bytes
I got suggestion that use of macro variables for input is "invalid method", here is other version of the code which basically wraps the original one (look below) inside a %window statement (makes it more obfuscated and limits it use to the DMS env. only):
The prompt window for DMS:
%window i a 4 b 4;%display i;

The code that sums primes and prints result to the log
data;array a[&b](. 2:&b);do i=2 to sqrt(&b);if a[i] then do j=2*a[i] by a[i] while(j<=&b);a[j]=.;end;end;x=sum(of a&a--a&b);put x;run;

Length of the code which "does the job" effectively stays the same.
Let me share a comment about "invalidity" of the first approach:
Passing input data in all 3 programming interfaces SAS DMS, SAS EG, or SAS Studio can be done:

by a SAS dataset,
by a text file,
hard-coded inside data step, and
by macrovariables.

A programmer does not have to wrap-up 4GL code inside a macro to use macrovariables in it, for example the following works perfectly well:
%let a=42;

data _null_;
  the_answer=&a.;
  put the_answer;
run;

The DMS allows window and display statements and they macro language counterparts %window and %display to produce a prompt input window. Unfortunately those are DMS "specific" and not working in the EG or SAS Studio interfaces.
Assuming we are working in the DMS env. For a SAS programmer execution of the following code, which creates and opens prompt input window:
%window in
@1 'a:' a 8 'b:' b 8;
%display in;

just before the data step and typing in values of a and b
is effectively equivalent to running:
%let a=XXX;
%let b=YYY;

with XXX and YYY as values for a and b.

The original post below:*

input in SAS can be done by macrovariables:
%let a=3;
%let b=1000000;

the code sums primes and prints result to the log
data;array a[&b](. 2:&b);do i=2 to sqrt(&b);if a[i] then do j=2*a[i] by a[i] while(j<=&b);a[j]=.;end;end;x=sum(of a&a--a&b);put x;run;

more readable version, _null_ added to stop dataset creation:
%let a=3;
%let b=1000000;
data ;
  array a[&b] (. 2:&b); /* array of integers from 2 to b */
  do i = 2 to sqrt(&b); /* loop until sqrt of b */
    if a[i] then        /* if there is value in the array at i */
      do j=2*a[i] by a[i] while (j<=&b);
        a[j] = .;       /* ... replace all multiplicities of a[i] with missings */
      end;
  end;
  x = sum(of a&a--a&b); /* sum elements for position a to b */
  put x;
run;

SAS, 130 134
I got suggestion that use of macro variables for input is "invalid method", here is other version of the code which basically wraps the original one (look below) inside a %window statement (makes it more obfuscated and limits it use to the DMS env. only):
The prompt window for DMS:
%window i a 4 b 4;%display i;

[Edit: some spaces were not necessary.]
The code that sums primes and prints result to the log
data;array a[&b](. 2:&b);do i=2to sqrt(&b);if a[i]then do j=2*a[i]by a[i]while(j<=&b);a[j]=.;end;end;x=sum(of a&a--a&b);put x;run;

Length of the code which "does the job" effectively stays the same.
Let me share a comment about "invalidity" of the first approach:
Passing input data in all 3 programming interfaces SAS DMS, SAS EG, or SAS Studio can be done:

by a SAS dataset,
by a text file,
hard-coded inside data step, and
by macrovariables.

A programmer does not have to wrap-up 4GL code inside a macro to use macrovariables in it, for example the following works perfectly well:
%let a=42;

data _null_;
  the_answer=&a.;
  put the_answer;
run;

The DMS allows window and display statements and they macro language counterparts %window and %display to produce a prompt input window. Unfortunately those are DMS "specific" and not working in the EG or SAS Studio interfaces.
Assuming we are working in the DMS env. For a SAS programmer execution of the following code, which creates and opens prompt input window:
%window in
@1 'a:' a 8 'b:' b 8;
%display in;

just before the data step and typing in values of a and b
is effectively equivalent to running:
%let a=XXX;
%let b=YYY;

with XXX and YYY as values for a and b.

The original post below:
input in SAS can be done by macrovariables:
%let a=3;
%let b=1000000;

the code sums primes and prints result to the log
data;array a[&b](. 2:&b);do i=2 to sqrt(&b);if a[i] then do j=2*a[i] by a[i] while(j<=&b);a[j]=.;end;end;x=sum(of a&a--a&b);put x;run;

more readable version, _null_ added to stop dataset creation:
%let a=3;
%let b=1000000;
data ;
  array a[&b] (. 2:&b); /* array of integers from 2 to b */
  do i = 2 to sqrt(&b); /* loop until sqrt of b */
    if a[i] then        /* if there is value in the array at i */
      do j=2*a[i] by a[i] while (j<=&b);
        a[j] = .;       /* ... replace all multiplicities of a[i] with missings */
      end;
  end;
  x = sum(of a&a--a&b); /* sum elements for position a to b */
  put x;
run;

Scala, 260 bytes
object P extends App{
def c(M:Int)={val p=(false::false::true::List.range(3,M+1).map(_%2!=0)).toArray
for(i<-(3 to M)
if p(i))
{var j=i*i
while(j<M){p(j)=false
j+=i}}
p}
val l=args.map(_.toInt)
val p=c(l(1))
println((l(0)to l(1)).filter(p).map(_.toLong).sum)}

A self-written primes-sieve.
time scala P 3900000 4000000
25811704341

real    0m8.288s
user    0m6.968s
sys 0m0.456s

Python, 133
A little bit of sorcery:
x,y=map(int,raw_input().split())
y+=1
a=range(y)
print sum(i for i in[[i for a[::i]in[([0]*y)[::i]]][0]for i in a[2:]if a[i]]if i>=x)

You can remove y+=1 and instead use range(y+1) and ([0]*-~y)[::i] to save a byte (removing the newline). And using Python 3 will allow you to use input(), as long as you put parentheses after print, therefore removing 4 bytes, but adding 1. Worth it.

PowerShell, 94 bytes
$a,$b=$args[0,1]
(.{$p=2..$b
while($p){$p[0];$p=@($p|?{$_%$p[0]})}}|
?{$_-gt$a}|
measure -s).sum

F# (141)
One third of the code is for parsing the input.
let[|a;b|]=System.Console.ReadLine().Split(' ')
{int a..int b}|>Seq.filter(fun n->n>1&&Seq.forall((%)n>>(<>)0){2..n-1})|>Seq.sum|>printfn"%A"

Perl, 62 with bonus
use ntheory":all";while(<>){say vecsum(@{primes(split/\s+/)})}

Takes lines with two whitespace separated numbers and prints the sum of primes within the range.  Exits when it sees EOF.
47 for the simple case we assume the input magically arrives in $a and $b like a few other solutions:
use ntheory":all";forprimes{$s+=$_}$a,$b;say$s

or
use ntheory":all";say vecsum(@{primes($a,$b)})

With a newer module version that can be 39 characters:
use ntheory":all";say sum_primes($a,$b)

Julia, 69 bytes
a,b=int(split(readline()));println(sum(setdiff(primes(b),primes(a))))

This reads a space-delimited pair of integers from STDIN and prints the result to STDOUT. The only thing I've really golfed here is whitespace; otherwise this is probably how I would go about it in a non-golfing context.
Ungolfed + explanation:
# Read a line from STDIN, split it into an array on the space, convert
# the elements to integers, and assign the first element to a and the
# second to b
a, b = int(split(readline()))

# Get the primes between a and b inclusive. primes(x) returns the primes
# <= x, so the set difference of primes(b) and primes(a) will get us only
# those between a and b
d = setdiff(primes(b), primes(a))

# Print the sum to STDOUT
println(sum(d))

Just realized how old this challenge is.

Racket, 103 bytes
(define(s a b)(for/sum([n(range a(+ b 1))]#:when(and(> n 1)(=(modulo(apply *(range 1 n))n)(- n 1))))n))

Try it online!

Explanation
This function receives two range inputs: \$ 1 \le a \le b \text{ (inclusive)} \$. It returns the sum of all prime numbers between the range. To determine whether n is a prime number or not, two conditions must be satisfied:
The first condition is \$ n > 1 \$ as 1 is not a prime. The second condition is the observation that Wilson's Theorem returns \$ n - 1 \$ when \$n\$ is a prime.
$$ n - 1 = (n - 1)!\mod n $$

n
\$(n - 1)! \mod n \$
Is a prime?

2
1
Yes

3
2
Yes

4
2
No

5
4
Yes

6
0
No

The reason for the first condition is that the theorem states that 1 is a prime, but it isn't. The theorem is only accurate when \$ n \ge 2 \$.
Putting this into the code is simple:
(define (sum-of-primes a b)
  (for/sum ([n (range a (+ b 1))]
            #:when (and (> n 1)
                        (= (modulo (apply * (range 1 n)) n)
                           (- n 1))))
    n))  ; will be collected

The for/sum loop collects all the values when #;when is true. So if the number is a prime number, for/sum will add it. Once the loop has finished iterating, it will return the summed up result.
Have a wonderful weekend!

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Tree traversal.
Write the shortest code that traverses a tree, breadth-first.
Input
any way you like
Output
a list of "names" of the nodes in correct order.

What do you mean by correct order? Ascending?

@sindikat, the order traversed.

Common Lisp, 69 chars
returns rather than prints the list and takes input as argument
(defun b(e)(apply #'nconc (mapcar #'car (cdr e))(mapcar #'b (cdr e))))

Format is the same as below except it requires a 'dummy' root node like so:
(root (a (b (1) (2)) (c (1) (2))))

Common Lisp: (95 chars)
This one reads and prints instead of using arg parsing
(labels((b(e)(format t "~{~A~%~}"(mapcar #'car (cdr e)))(mapcar #'b (cdr e))))(b`((),(read))))

input to stdin should be a lisp form s.t. a tree with root a and two children b and c, each of which have children 1 & 2 should be (a (b (1) (2)) (c (1) (2)))
or equivalently -
(a
  (b
    (1)
    (2))
  (c
    (1)
    (2)))

Funny, but cryptic. Even Scheme experience doesn't help much. :-)

format is a language unto itself ;) and scheme doesn't have an equivalent. if you add spaces/newlines in sensible places and read http://gigamonkeys.com/book/a-few-format-recipes.html it should become clearer ;)

In short there is a function b that prints all of the immediate children one per line, then recurses on all of the children. (note it does not print itself). when b is first called it is given a fake tree with only one child such that the problem of not printing itself doesn't occur...

Aah, thanks, I'll look into that.

Haskell — 84 76 characters
data N a=N{v::a,c::[N a]}
b(N a b)=d[a]b
d r[]=r
d r n=d(r++(map v n))$n>>=c

In a more readable format:
data Node a = Node {value::Int, children::[Node a]}

bfs :: Node Int -> [Int]
bfs (Node a b) = bfs' [a] b
  where bfs' res [] = res
        bfs' res n = bfs' (res ++ (map value n)) $ concatMap children n

The code allows infinite number of child nodes (not just left and right).
Sample tree:
sampleTree =
    N 1 [N 2 [N 5 [N  9 [],
                   N 10 []],
              N 6 []],
         N 3 [],
         N 4 [N 7 [N 11 [],
                   N 12 []],
              N 8 []]]

Sample run:
*Main> b sampleTree
[1,2,3,4,5,6,7,8,9,10,11,12]

Nodes are expanded in the order shown in Breadth-first search article on Wikipedia.

Haskell: 63 characters
data N a=N{v::a,c::[N a]}
b n=d[n]
d[]=[]
d n=map v n++d(n>>=c)

This is really just a variation on @Yasir's solution, but that one isn't community wiki, and I couldn't edit it.
By just expanding the names, and replacing concatMap for >>=, the above golf'd code becomes perfectly reasonable Haskell:
data Tree a = Node { value :: a, children :: [Tree a] }

breadthFirst t = step [t]
  where step [] = []
        step ts = map value ts ++ step (concatMap children ts)

The only possibly golf-like trick is using >>= for concatMap, though even that isn't really that uncommon in real code.

Wow, Haskell beats all other languages here. Haven't thought of shortening the code in that way; maybe I am just used to program in terms of Tail recursion. I think I should also note that both solutions allow infinite number of child nodes, and are type-safe, leveraging Type polymorphism unobtrusively. People, [learn,use,enjoy] Haskell!

GolfScript, 4
Not a serious answer, but the Golfscript version of tobyodavies' sed answer is only 4 chars
n%n*

you could argue that
n%

is also sufficient,as it returns the tree items as a list, however these are displayed mashed together on stdout.
n%p

displays the list representation of the tree items (looks like a Python or Ruby list)

Python - 59 chars
This one returns a generator, but modifies T, so you may want to pass in a copy
def f(T):
 t=iter(T)
 for i in t:yield i;T+=next(t)+next(t)

testing
              4
             / \
            /   \
           /     \
          2       9
         / \     / \
        1   3   6   10
               / \
              5   7
                   \
                    8

>>> T=[4,[2,[1,[],[]],[3,[],[]]],[9,[6,[5,[],[]],[7,[],[8,[],[]]]],[10,[],[]]]]
>>> f(T)
<generator object f at 0x87a31bc>
>>> list(_)
[4, 2, 9, 1, 3, 6, 10, 5, 7, 8]


text:
Implement a Non-Guessing Sudoku Solver
Implement the shortest Sudoku solver.
Sudoku Puzzle:
 | 1 2 3 | 4 5 6 | 7 8 9
-+-----------------------
A|   3   |     1 |
B|     6 |       |   5
C| 5     |       | 9 8 3
-+-----------------------
D|   8   |     6 | 3   2
E|       |   5   |
F| 9   3 | 8     |   6
-+-----------------------
G| 7 1 4 |       |     9
H|   2   |       | 8
I|       | 4     |   3

Answer:
 | 1 2 3 | 4 5 6 | 7 8 9
-+-----------------------
A| 8 3 2 | 5 9 1 | 6 7 4
B| 4 9 6 | 3 8 7 | 2 5 1
C| 5 7 1 | 2 6 4 | 9 8 3
-+-----------------------
D| 1 8 5 | 7 4 6 | 3 9 2
E| 2 6 7 | 9 5 3 | 4 1 8
F| 9 4 3 | 8 1 2 | 7 6 5
-+-----------------------
G| 7 1 4 | 6 3 8 | 5 2 9
H| 3 2 9 | 1 7 5 | 8 4 6
I| 6 5 8 | 4 2 9 | 1 3 7

Rules:

Assume all sudokus are solvable by logic only.
All input will be 81 characters long. Missing characters will be 0.
Output the solution as a single string.
The "grid" may be stored internally however you wish.
The solution must use a non-guessing solution. (see Sudoku Solver)

Example I/O:
>sudoku.py "030001000006000050500000983080006302000050000903800060714000009020000800000400030"
832591674496387251571264983185746392267953418943812765714638529329175846658429137

You should really add a time limit.

Pretty sure this has been done before. There are some very short solvers out there, but some puzzles will take a long long time to solve using a naive algorithm

@JPvdMerwe: Good point, but a time limit would be hard to standardize.

@gnibbler: It might have been done before (but not on codegolf.se). I think it will still be fun to solve as well as add some value to the community, especially if one goes about it honestly.

I like this one. I've been hesitant to try an actual golf solution, and I've been thinking about writing a Sudoku solver (it seems like a fun exercise). I think it's something people like me, who've never golfed before, could use as a jumping-off point. And once I come up with one, I might then golf it.

@Andy: gnibbler and JPvdMerwe brought up a good point that naive solvers could eventually solve this questions given enough time. My intention for this question was for it be solved specifically by logic. Since no one has answered I think I will add that specification.

@snmcdonald: Pardon my ignorance, but what exactly do you mean by "by logic"? Do you mean, no brute-forcing?

@Andy: see http://www.sudokusolver.co.uk/step.html

is bruteforce guessing?

@stole: yes it is. We could have another Code Golf that is a guessing only solution. As JPvdMerwe suggested it might be a good idea to add a time limit to a guessing solution.

You could make use of answers here: http://projecteuler.net/index.php?section=problems&id=96

This is definitely an interesting problem. Unfortunately, since it's a lot harder than brute-forcing it, and brute-forcing it appears to be quite fast ( http://codegolf.stackexchange.com/questions/378/implement-a-brute-force-sudoku-solver ), I'm not sure that there's much point in solving it logically other than the challenge. If all you care about is solving it, then brute force does just fine (and it's a lot easier to write). Nonetheless, solving it logically is definitely a great challenge.

@Jonathan, IMO the main point to solving it logically is to estimate the difficulty.

Problems "solvable by logic only" is very vague. Do you mean, perhaps, using only the basic steps of a) Writing a value in a cell for which it's value not in its row, column, and block b) Identifying a number that can only go in one place in its row, column, or block, and writing it there?

RUBY (449 436 chars)
I=*(0..8)
b=$*[0].split('').map{|v|v<'1'?I.map{|d|d+1}:[v.to_i]};f=b.map{|c|!c[1]}
[[z=I.map{|v|v%3+v/3*9},z.map{|v|v*3}],[x=I.map{|v|v*9},I],[I,x]
].map{|s,t|t.map{|i|d=[a=0]*10;s.map{|j|c=b[i+j];c.map{|v|d[v]+=1if !f[i+j]}
v,r=*c;s.map{|k|b[i+k].delete(v)if j!=k}if !r
s[(a+=1)..8].map{|k|s.map{|l|b[i+l]-=c if l!=k&&l!=j}if c.size==2&&c==b[i+k]}}
v=d.index 1;f[i+k=s.find{|j|b[i+j].index v}]=b[i+k]=[v]if v}}while f.index(!1)
p b*''

Example:
C:\golf>soduku2.rb 030001000006000050500000983080006302000050000903800060714000009020000800000400030
"832591674496387251571264983185746392267953418943812765714638529329175846658429137"

quick explanation:
Board b is an array of 81 arrays holding all the possible values for each cell.
The array on line three holds [offset,start_index] for each group (boxes,rows,columns).
Three tasks are performed while iterating through the groups.

The value of any cell of size 1 is removed from the rest of the group.
If any pair of cells contain the same 2 values, these values are removed from the rest of the group.
The count of each value is stored in d - if there is only 1 instance of a value, we set the containing cell to that value, and mark the cell fixed in f

Repeat until all cells are fixed.

You can omit the brackets in I=*(0..8), will save 2 chars.

I get sudokusolver.rb:8: unterminated string meets end of file if I start it with ruby1.8  sudokusolver.rb 030.... What am I doing wrong?

Looks like there is an extra ' on the last line.  Not sure how that got there...

Prolog - 493 Characters
:-use_module(library(clpfd)).
a(X):-all_distinct(X).
b([],[],[]).
b([A,B,C|X],[D,E,F|Y],[G,H,I|Z]):-a([A,B,C,D,E,F,G,H,I]),b(X,Y,Z).
c([A,B,C,D,E,F,G,H,I|X])-->[[A,B,C,D,E,F,G,H,I]],c(X).
c([])-->[].
l(X,Y):-length(X,Y).
m(X,Y):-maplist(X,Y).
n(L,M):-l(M,L).
o(48,_).
o(I,O):-O is I-48.
:-l(L,81),see(user),m(get,L),seen,maplist(o,L,M),phrase(c(M),R),l(R,9),m(n(9),R),append(R,V),V ins 1..9,m(a,R),transpose(R,X),m(a,X),R=[A,B,C,D,E,F,G,H,I],b(A,B,C),b(D,E,F),b(G,H,I),flatten(R,O),m(write,O).

Output:
Inputting:
000000000000003085001020000000507000004000100090000000500000073002010000000040009
Outputs:
987654321246173985351928746128537694634892157795461832519286473472319568863745219
Inputting:
030001000006000050500000983080006302000050000903800060714000009020000800000400030
Outputs:
832591674496387251571264983185746392267953418943812765714638529329175846658429137

PowerShell, 491 490 488 465 463 bytes
$w=,0*81;$c=,(1..9)*81
$a=(24,24,6)*3|%{,(0..8|%{($r++)});,(0..8|%{$v%81;$v+=9});$v++;,((1,1,7)*3|%{+$q;$q+=$_});$q-=$_}
filter g($v,$i){if($v){$a|?{$i-in$_}|%{$_|%{$c[$_]=$c[$_]-ne$v}};$w[$i]=$v;$c[$i]=@()}}
$args|% t*y|%{g($_-48)($i++)}
for(;$a|%{($b=$_)|?{($v=$c[$_])}|?{(($c[$b]|%{"$_"})-eq$v).Count-eq$v.Count
$c[$b]|%{$_}|group|? C* -eq 1|? N* -in $v|%{$v=+$_.Name;1}}|%{$b|?{"$v"-ne$c[$_]}|%{$c[$_]=@($c[$_]|?{$_-notin$v})}
g($v[0]*!$v[1])$_
1}}){}
-join$w

Try it online!
Implemented Solving methods: Single, Naked Pair, Naked Trio, Naked Quad and Hidden Single.
See Terms related to solving
See also the code with debug output.

Perl 5, 295 bytes
sub P{$r=$p/9;$c=$p%9;$q=3*~~($r/3)+$c/3}sub N{($i,$u)=@_;P;$G[$p]=$u*$i;$R[$r]{$i}=$C[$c]{$i}=$Q[$q]{$i}=$u}sub S{if($p>80){print@G;exit}if($G[$p]){S(++$p);$p--}else{N($_,1),S(++$p),$p--,N($_)for grep{P;$R[$r]{$_}+$C[$c]{$_}+$Q[$q]{$_}<1}1..9}}@G=split'',$ARGV[0];N($G[$p=$_],1)for 0..80;$p=0;S

Try it online!
Shortened from 339 to 317 to 315 to 314 to 310 to 309 to 298 to 295

nice. there is the test case in the Prolog answer 000000000000003085001020000000507000004000100090000000500000073002010000000040009. Would you like to run your solution with this test case?

Nice example :-) . It is kind of worst case, with a solution having 987654321 in the first line. It runs into the time limit on TIO, but run locally on my PC it still outputs the correct solution -- after around 10 minutes. There is, of course, room for performance optimization, but it would make the code longer.

Thanks. This is CodeGolf, so a performance does not matter

I'm afraid the grep uses guesswork and your solution uses a brute force.  I'm guessing :) your answer would be better suited for Implement a Brute Force Sudoku Solver. See rule 5 in this question.

I have seen the discussion to the question and I am not quite sure what "brute force" means. I use a simple backtracking algorithm. So this is based on trying numbers in a free call, going on and roll back if there is a dead end. First I thought of a real brute force approach, trying each number in each free cell and then checking if this is a solution. Although it may take longer than the age of the universe, it will eventually find the solution. Btw. there are cases where it is unavoidable to try several candidates for a solution unless you blow up the logic in an unreasonable way.

If backtracking were not allowed, a solution in Prolog should not be valid either because Prolog does backtracking inherently. It is just hidden under the surface.

Prolog does backtracking inherently. Yes, it is. I mean, it's worth looking at Perl answers were on Implement a Brute Force Sudoku Solver

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/