g | x | w | all
Bytes Lang Time Link
049Bespoke250808T043043ZJosiah W
028Setanta250807T183439Zbb94
008AWK250807T182806Zxrs
003><>170226T110801ZPidgeyUs
008Zsh230710T103020Zroblogic
018brainfuck230707T091414Zl4m2
008Juby230707T034431ZJordan
008Haskell230707T030604ZYelp
031Acc!!230706T185520ZDLosc
004√ å ı ¥ ® Ï Ø ¿170401T121050Zcaird co
002Vyxal HṪ230706T155350ZThe Empt
001Thunno 2230608T165552ZThe Thon
003Braingolf170523T102800ZMayube
003J220219T075356Zsinvec
002HBL211125T200234ZDLosc
001MATL170213T023211ZSuever
009Google Sheets200820T144022ZGeneral
004MAWP200820T040659ZRazetime
0061+200820T042602ZTwilight
012Flurry200820T035939ZBubbler
056naz200126T080449Zsporebal
003GolfScript200126T085608Zuser8505
005Keg190914T131052Zuser8505
002x86 opcode171216T082811Zl4m2
002Jelly170213T162837Zuser6318
007Hexagony171121T072612Zboboquac
002Implicit171116T033145ZMD XF
006Aceto171118T162214Zqqq
008Perl 5170916T012831ZXcali
017Windows batch170227T102548Zstevefes
013Excel VBA170709T151128ZTaylor R
023Underload170619T155820ZMadison
035MarioLANG170528T073947Zuser6933
009Aceto170523T101248ZL3viatha
003Japt170523T100844ZShaggy
028c++170405T134103Zjdt
017Python170302T155951Ziwaseate
009Haskell170401T032440ZGeneric
010///170226T052344Zboboquac
013Melang Non competing170307T163338Zuser6318
002Milky Way170228T170120Zuser6318
004APL 4 Bytes170301T230501ZAntisthe
022PHP170301T020926ZTitus
007Cardinal170228T145646Zfəˈnɛtɪk
033ForceLang170226T121620ZSuperJed
044Java170226T120351Zuser6333
013C gcc170226T094824ZAhemone
018C170226T084832ZAlbert R
015Powershell170213T115742Zcolsw
002Brachylog170213T090133ZFatalize
003Clack170216T024323ZSocratic
001RProgN170213T014109ZATaco
022SQLite170214T145551ZBusiness
008Cubix170213T152102ZLuke
011Hexagony170214T175311ZRiley
026Scala170214T174715ZMichal
006Labyrinth170214T173234ZSnoringF
010Java OpenJDK 9170213T062305ZPavel
002Chaincode170214T093125ZLinnea G
1317PHP170213T102242Zmleko
011Cheddar170214T043957ZPavel
004Beam170213T224846ZMickyT
011Clojure170213T222129ZCarcigen
003TIBasic170213T030507ZTimtech
005Forth170213T220129ZKoppany
010Javascript170213T215916ZMalivil
005dc170213T211757ZMitchell
004O170213T210813ZMickyT
012brainfuck170213T202735Zmbomb007
012Javascript170213T110705Zsvarog
008BrainFlak170213T025710ZDJMcMayh
003CJam170213T164243ZBusiness
013Python170213T020506Zxnor
003MATLAB / Octave170213T031026ZSuever
004Perl 6170213T131855Zsmls
008QBIC170213T120703Zsteenber
019C170213T074339ZAbel Tom
010Javascript ES6170213T095915Zuser6403
001Pyke170213T104443ZBlue
098Ruby170213T094220ZG B
017PHP170213T095605Zaross
00105AB1E170213T093153ZOkx
013R170213T064832ZRudier
025Lua170213T092244ZIDid
032C#170213T090018ZMika
003Carrot170213T084312Zuser4180
019PHP170213T055925Zuser6395
003Vim170213T030640ZDJMcMayh
003Retina170213T025906Zuser6213
005Mathematica170213T025148ZGreg Mar
1117Billiards170213T020831Zhyperneu
012Turtlèd170213T021031ZDestruct
004SmileBASIC170213T015222Z12Me21

Bespoke, 49 bytes

using C
added a specific pair
segfault
o,stupid C

Outputs !(A+B).

Setanta, 29 28 bytes

Thanks to General Grievance for −1 byte

gniomh(a,b){toradh a==b|0&1}

Returns 1 if the arguments are equal; 0 otherwise.

try-setanta.ie link

AWK, 8 bytes

$0=1$1$2

Attempt This Online!

><>, 3 bytes

Also see this post, but ><> needs the explicit print and termination so we can't go under 3 bytes.

=n;

But this is a pretty boring solution. There are two 5 byte solutions

1nnn;

and

1++n;

that are only slightly more interesting. For input a and b, the first one works by printing 1ba and the second by printing a+b+1.

Here is a TIO test bench where bytes 2-5 should be replaced by the first 4 bytes of a solution.

Zsh, 8 bytes

<<<9$1$2

Try it online!

Concatenates 9 A B which is always larger than A + B

brainfuck, 18 bytes

,[>-[----->+<]>.,]

Try it online!

Output is always lot larger than input

J-uby, 8 bytes

:+%:succ

Attempt This Online!

Haskell, 8 bytes

(+).succ

Try it online!

I'm certain this could be shorter but I haven't found a solution yet.

Acc!!, 31 bytes

Count i while N-10 {
Write 57
}

Takes the two numbers space-separated. Try it online!

Explanation

Count i while N-10 {   # While input character is not a newline:
    Write 57           # Output 9
}

To prove that the output is always valid, consider the following numbers:

The output of this program is N+ (the extra 9 comes from the space between the input numbers). Looking at the formulas, we have A + B <= AB, AB <= N, and N < N+; therefore, this program's output is always greater than (and therefore not equal to) A + B.

√ å ı ¥ ® Ï Ø ¿, 4 bytes

II1_

II   Take 2 inputs and push to the stack
  1  Push 1 to the stack
   _ Push the sum of the stack

To output, add o to the end.

Vyxal HṪ, 2 bytes

□∑

I had to post this as it is quite obfuscated.

Try it Online!

Explanation

□∑­⁡​‎‎⁡⁠⁡‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁢‏‏​⁡⁠⁡‌­
□   # ‎⁡Get input treated as a list separated by newlines.
 ∑  # ‎⁢Sum the list together.

💎 Created with the help of Luminespire at https://vyxal.github.io/Luminespire

With the explanation above, it seems like that this returns the correct sum. But if you think this, then you haven’t paid attention to the flags.

HṪ­⁡​‎‎⁡⁠⁡‏‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁢‏‏​⁡⁠⁡‌­
H   # ‎⁡Before execution, push 100 to the stack.
 Ṫ  # ‎⁢After execution, take the sum of the whole stack and print it.

💎 Created with the help of Luminespire at https://vyxal.github.io/Luminespire

Now that you have the full picture, you realise that it adds 100 to the result.

Thunno 2, 1 byte

=

Attempt This Online!

Port of @ATaco's RProgN answer.

Braingolf, 3 bytes

g1+

Appends the inputs to eachother (ie 17, 4 becomes 174), then increments by 1.

Notable testcases:

[0, 0] becomes 00, becomes 01
[0, 1] becomes 01, becomes 02
[1, 0] becomes 10, becomes 11
[1, 1] becomes 11, becomes 12

J, 3 bytes

+>:

Try it online!

HBL, 2 bytes

+.,1

Try it at HBL Online!

Explanation

+     Add
 .    the first argument
  ,   the second argument
   1  and one

MATL, et al. 1 byte

=

Accepts two natural numbers as inputs and compares them. If they are equal, the output is 1 and if they not equal the output is 0. This is the same approach as @ATaco's solution.

Google Sheets, 9

=--(A1=A2

Why didn't I use =A1+A2+1? Because if I input a sufficiently large number and 0, the +1 does nothing.

MAWP, 4 bytes

@MM:

adds the numbers to the 1 in stack.

Try it!

1+, 6 bytes

..+1+:

As usual. a + b + 1.

Flurry, 12 bytes

[]{<{}{}>}{}

Run example

$ printf "0 0" | ./flurry -nib -c "[]{<{}{}>}{}"
73728
$ printf "0 1" | ./flurry -nib -c "[]{<{}{}>}{}"
75264
$ printf "0 11" | ./flurry -nib -c "[]{<{}{}>}{}"
3687936

Takes two numbers separated by single space from stdin in binary mode, and prints the return value as an integer.

The binary mode is the trick here. What the program does is to implicitly push all codepoints of stdin to the stack, and print the product of the entire stack.

Code explanation

// Pop (stack height + 1) times and compute the product;
// popping from empty stack gives I = 1
//     []     {<{}{}>}  {}
main = height times-pop pop

//          {   <{}  {}  >}
times-pop = \x.  x ∘ pop

Proof that this does not give a+b for any a b

Base case: The input of "0 0" gives 48 × 32 × 48 = 73728.

Inductive case:

Therefore, the output grows much faster than the value of a+b, and they can never be equal.


For comparison, here is the program that computes a+b+1:

Flurry, 18 bytes

{}(<><<>()>)[{}{}]
$ ./flurry -nin -c "{}(<><<>()>)[{}{}]" 12 13
26
$ ./flurry -nin -c "{}(<><<>()>)[{}{}]" 0 0
1
$ ./flurry -nin -c "{}(<><<>()>)[{}{}]" 0 10
11
// initial stack = a b
//     {}  (<><<>()>)  [{}   {} ]
main = pop (push succ) (pop  pop)
//     b                succ a
     = b succ (succ a)
     = b + succ a = a + b + 1

naz, 56 bytes

6a8m2x1v1x1f1r3x1v2e0m1o0x1x2f2r3x1v3e0m1o0x1x3f1a1o0x1f

Takes two natural numbers as input, separated by a space.

Explanation (with 0x commands removed)

6a8m2x1v         # Set variable 1 equal to 48 ("0")
1x1f1r3x1v2e0m1o # Function 1
                 # Read the first byte of input, removing it from the input string
                 # Jump to function 2 if it equals variable 1
                 # Otherwise, output 0
1x2f2r3x1v3e0m1o # Function 2
                 # Read the second byte that's still in the input string
                 # Jump to function 3 if it equals variable 1
                 # Otherwise, output 0
1x3f1a1o         # Function 3
                 # Output 1
1f               # Call function 1

GolfScript, 3 bytes

Input is to be taken as two separate lines. In GolfScript, a preceding 0 is allowed for numbers.

n/0

Try it online!

Explanation

# Two inputs taken with newlines
n/  # Split the input (separated by newlines) with newlines
  0 # Add a 0 to prevent a preceding 0
    # Implicit concatenation

GolfScript, 3 bytes

~+)

Try it online!

Explanation

~   # Evaluate the input
 +  # Add the two numbers
  ) # Increment the sum

Keg, 5 bytes

Input two natural numbers separated with spaces.

?(+).

Sums the whole stack. The answer is guaranteed to be invalid, since what it sums is the charcodes of the numbers.

TIO

x86 opcode, 2 bytes

INC EDX
RET

input EAX and EDX, output EDX:EAX If D':A=D+A then D has to be zero, making the equation still not correct

x86 opcode __cdecl, 3 Bytes

MOV DL, 3
RET

Jelly, 2 bytes

+‘

The + adds the two inputs together then the ' increments the answer by one

Try it online!

Hexagony, 7 bytes

?<.!?)@

Try it online!

Or in more readable format,

 ? <
. ! ?
 ) @

This beats the current Hexagony solution of 11 bytes.

Explanation:

If the first number is not 0, the program takes the following path:

Not 0

This reads the first number and branches right. Then it reads the second number, followed by wrapping and trying to read a third, but that doesn't exist so it reads 0. This is printed and the program terminated (note that if a>0, since b is non-negative a+b>0).

If the first number is 0, the program takes the following path to start with:

Is 0

This reads the first number and branches left. It hits the corner, taking the route from along the north-west edge because the number is 0, and reads the second number. It wraps, then increments the second number and prints.

Is still 0

It bounces against the <, printing the incremented second input again. It increments the value and takes the north-east edge again, but this time because the current edge a twice-incremented non-negative value which is definitely positive. It then tries to get a third input, but receives 0 instead.

Is still 0 some more

Finally it wraps and gets diverted by the arrow, then tries to read a fourth input and gets 0 again. It wraps and tries to read a fifth input and receives 0 for the last time. This it prints, and wraps to the @ and exits.

Note that b*(10^k+1)*10>0+b=b where k is the length of b in digits, so this works.

Implicit, 2 bytes

+.

Try it online!

+.   implicit input of two integers
+    add them
 .   and increment

= also works for 1 byte, but I added that to the existing list of =s.

Aceto, 6 bytes

rrJiIp
r reads input and puts on stack (x2)
J concatenates top 2 values
i makes it an integer
I increments it
p prints it

Try it online!

Perl 5, 8 bytes

7 bytes of code + 1 flag (-p)

$_+=!<>

Try it online!

Windows batch, 24 23 17 bytes

@cmd/cset/a%1+%21

Test cases:

Tested on Win10 64-bit

Foo\Bar\Baz>NotCalc.bat 1 55
552

Note: batch files are limited to 32-bit signed integer!

Excel VBA, 13 Bytes

Anonymous VBE immediate window function that takes input from range [A1:B1] (... or really any range that is a subset of [1:1], I suppose) and outputs their sum +7

?[Sum(1:1)+7]

Underload, 23 bytes

((::)~*)~(~)~*a*^*(**)*

Takes input in the form of Church numerals on the stack and outputs to the stack.

Try it online!

MarioLANG, 35 bytes

;
)
;
>[!(+:
"=#===
) -
+ (
! <
#="

Reads two inputs and puts them in differents cells (variables). Increments one and decrements the other until the second number is zero. Then adds one calculate the wrong answer.

Aceto, 9 bytes

ir+1
ri+p

Super straightforward. Prints the sum of the two inputs and 1. If I can assume for the inputs to be on the stack already, there's a 5-byte solution:

1+
+p

Japt, 3 bytes

NxÄ

Try it online


Explanation

N   :The array of all inputs
x   :Sum the array
Ä   :Add one to each element

c++, 28 bytes

[](int a,int b){return!a+b;}

Try it here

Python, 25 17 bytes

Takes an array of numbers n, and returns their sum + 1:

lambda n:sum(n,1) 

I just translated https://codegolf.stackexchange.com/a/111845/66068 into python.

Haskell, 11 9 bytes

(succ.).(+)

Adds together and then adds 1

EDIT: Of course, if you want to go with the boring answer:

a#b=a+b+1

is 9 bytes.

///, 10 bytes + input

/0/1//+//[input A]+[input B]

Obviously [input A] and [input B] are supposed to be replaced with the appropriate inputs

Try it online!

Changes 0's to 1's, then concatenates the strings.

This works because:

So we have join(f(A),f(B))>f(A)+f(B)>=A+B.

And if one or both of the inputs are 0, we have join(1,B)>1+B>0+B, join(A,1)>A+1>A+0 and join(1,1)=11>0+0.

Note 1: This type of input has been approved by the community
Note 2: This output doesn't give leading 0's either
Note 3: Less bytes than Python, PHP, C#, C, Powershell and more!

Melang (Non competing) 13 bytes

\n\n+\n+\n\ni

I wrote Melang for this challenge and decided that it works so might as well bring it here.

Adds the numbers inputted together and adds one. For more on the language and to try it out visit here.

Milky Way 2 bytes

b!

Checks equality.

http://meta.codegolf.stackexchange.com/a/8493/63187 allows me to assume the inputs are pushed to stack.

Thank you Zach Gates! I out golfed him in his own language :P

APL - 4 Bytes

1++/

Takes array, sums its elements and adds one. Test:

 1++/1 2  
4
 1++/1 0
2

PHP, 22 bytes

eval("echo $argn+1;");

A port of ConnorLSW´s answer. Run with echo "<a>+<b>" | php -R '<code>'.

Cardinal, 7 bytes

%:+~:*.

Outputs sum + 1

Try it online!

ForceLang, 33 bytes

def a io.readnum()
io.write a+a+1

Java - 44 bytes

int n(int a,int b){return Math.abs(a+(-b));}

Returns an absolute value of a + (-b)

Ungolfed version:

int n(int a, int b) {
    return Math.abs(a + (-b));
}

C (gcc), 13 bytes

n(a,b){a=&b;}

returns b's address in memory, though it's slighty cheaty since the user is able to predict the address of b.

Try it online!

C, 18 bytes

#define f(a,b)a==b

try it online

Powershell, 15 Bytes

("$args"|iex)+1

input is in any standard mathematical format, 1+1,2+2,5123-123213,200*99,1234/555 etc.

Just takes input, invokes (calculates) it, then adds one at the end.

Brachylog, 2 bytes

+<

Try it online!

Explanation

+     The sum of the elements in the Input...
 <    ...is strictly less than the Output
      (implicitely label the output with an integer respecting this constraint)

This will always result in A+B+1, if Input = [A, B].

Clack, 3 bytes

1++

Since clack has very few instructions at the moment, the shortest method is to just push 1, the two numbers, and add them.

RProgN, 4 3 1 Byte

Crossed out 4 is still 4 ;(

E

The most simple of solutions, compares if A and B are equal. Pushes true, which RProgN sees as 1, if they are the same, or false aka 0 otherwise.

Test Cases

0+0 = 1
1+0 = 0
0+1 = 0
1+1 = 1

Try it online!

SQLite, 23 22 bytes

Saved 1 byte thanks to MickyT

select 1+sum(v)from i;

By default, SQL variants can take input from a named table. In this case it takes two numbers from the column v in the table i, sums them, and adds 1.

Try it online!

Cubix, 9 8 bytes

u-~OII/@

Explanation

Expanded, this answer looks like this:

    u -
    ~ O
I I / @ . . . .
. . . . . . . .
    . .
    . .

The order of the instructions that are executed is II~-O@

II~-O@
I      # First input
   -   # Minus
 I~    # NOT(second input)
    O  # Output as integer
     @ # End program

Tested for all combinations of inputs where both are in the range 0-100.

Try it here.

Hexagony, 11 bytes

?}?@!<."+)/

Prints X + Y + 1

Try it online!


The expanded Hex:

  ? } ?
 @ ! < .
" + ) / .
 . . . .
  . . .
  1. read into the initial memory edge.
  2. go forward to the right and read into that one.
  3. wrap around to the middle row.
  4. go backward to the left and sum the other edges into this one.
  5. increment.
  6. redirect NW then W to save a byte.
  7. print and exit.

Scala, 26 Bytes

var n=(a:Int,b:Int)=>a+b+1

Labyrinth, 6 bytes

??+)!@

Try it online!

Takes two number inputs, prints their sum + 1.

Java (OpenJDK 9), 10 bytes

a->b->a-~b

Try it online!

Chaincode, 2 bytes

a+

Explanation:

a   #Adds two input values
 +  #Increment

PHP, 13 bytes; (17 REPL-less)

!max($argv)+0

Examples

[0,0] -> 1
[0,1] -> 0
[1,0] -> 0

For those without REPL use

<?=!max($argv)+0;

and run using

echo '<?=!max($argv)+0;' | php -- 0 0

Cheddar, 11 bytes

(a,b)->a-~b

Try it online!

Beam, 4 bytes

This seems a bit cheaty, but it reads from the input (characters only) and outputs the ASCII values for each.

>r:!

Try it online!

>     # redirect right
 r    # read input character
  :   # output numeric value of beam
   !  # if beam <> 0 reflect back

The Halt command is required on here as the beam just disappears into the aether.

Clojure, 11 bytes

#(+ % %2 1)

Unoriginal. Just adds 1 to the sum of % and %2 (the arguments to the function).

TI-Basic, 3 bytes

not(max(Ans

Alternative solutions:

10^(sum(Ans         3 bytes @DestructibleWatermelon
not(sum(Ans         3 bytes
1+sum(Ans           4 bytes
Input :X=Y          5 bytes @ATaco
Input :X+not(Y      6 bytes
Input :not(X+Y      6 bytes
Input :10^(X+Y      6 bytes
Input :X+Y+1        7 bytes
Input :not(max(X,Y  7 bytes
Ans(1)=Ans(2        8 bytes
Ans(1)+not(Ans(2    9 bytes
not(Ans(1)+Ans(2    9 bytes

It's interesting that you made the question's examples in TI-Basic, but you forgot the shorter A=B (or maybe it was up to us to find out?)

Forth, 5 bytes

I didn't see Forth on the list, this is the A+B+1 solution.

+ 1 +

It adds the top 2 numbers on the stack, then adds one to it.

The answer will be the top value on the stack.

Example:

=> 4, 5
+ 1 +
=> 10

Javascript, 10 bytes

x=>y=>!x+y

Takes 2 numbers using currying syntax like so:

(x=>y=>!x+y)(0)(0) // 1

dc, 5 bytes

?1n+n

Try it online!

Input: Two natural numbers separated by a space on stdin.

Output: The digit 1 immediately followed by the sum of the two numbers, which is a number larger than the sum of the two numbers.

Example:

Input: 222 333

Output: 1555

O, 4 bytes

jj=o

The same as other implementations. Get the numbers, test the equality and output. Try it here

j    Number input
 j   Number input
  =  Equal to
   o Print object

brainfuck, 12 bytes

Simple solution that outputs A+B+1.

,>,[-<+>]<+.

Try it online

Javascript, 12 bytes

(a,b)=>a+b+1

Accepts 2 numbers inside a closed lambda and return their sum plus 1

Example:

((a,b)=>a+b+1)(1, 2)
// 4

Brain-Flak, 8 bytes

({}{}())

Try it online!

This is the most readable brain-flak answer I have ever written. :)

Explanation:

(      )    # Push the sum of all the following:
 {}         #   The first input
   {}       #   The second input
     ()     #   and one

Alternate solutions (also 8 bytes):

({}[]{})    # Sum + 1
([]{}{})    # Sum + 2

There's a bunch of other solutions that only work with positive numbers:

(<{}>{})
({}<{}>)
({{}}())
({{}()})
({{}}[])
({{}[]})

CJam, four 3 bytes

q~=

Try it online!

Explanation

q~   e# Read the input and eval it (pushes the numbers on the stack).
  =  e# Check equality.

Python, 13 bytes

[(0,0)].count

Try it online! Takes input as a tuple.

Using an object method for the function avoids the boilerplate of a lambda.

lambda a,b:a-~b   # 15 bytes

Here, the idea is to map (0,0) to 1 and everything else to 0. Since only 0+0 gives a sum of 0 among natural numbers, that always avoids matching the sum.

If one could output a Boolean here, which I find shady, a byte could be saved as

(0,0).__ge__

This checks if the input tuple is at most (0,0), which is only true for (0,0). In Python, True==1 and False==0. Even more shadily, outputting via exit code and treating that as a Python Boolen would save two bytes:

[(0,0)].pop

If string I/O is allowed and leading zeroes are OK, there's the 8-byte solution

'1'.join

This concatenates a1b, which is always bigger than a+b.

MATLAB / Octave, 3 bytes

@eq

Accepts two inputs and checks for equality and yields 1 if they are equal and 0 otherwise.

Online Demo

Perl 6, 4 bytes

!*+*

A lambda (formed by Whatever-currying), that adds the boolean inverse (1 or 0) of the first argument to the second argument.

Try it online!

QBIC, 8 bytes

a bit uninteresting:

::?a+b+1

This just takes A and B from the cmd-line, adds them plus 1.

C 26 24 19 bytes

f(c,d){return!c+d;}

Ungolfed version:

int f(int c,int d)
{
   return !c+d; 
}

I hope I got the specification right. Can definitely be shortened!?

@Pavel Thanks for saving 2 bytes

@Neil Thanks for your input.

Javascript (ES6), 10 Bytes

x=>y=>!x+y

Put f= before the code and run like f(x)(y).

This will output y plus either 0 or 1 depending on whether x is truthy or falsy, respectively.

Thanks to TomDevs for the bytes saved

Pyke, 1 byte

q

Try it here!

This is the only 1 byte solution that works in Pyke, all the others have collisions.

Ruby, 9 bytes (8 + -n flag)

p~/1/||1

Input 2 integers separated by comma or space or semicolon or just whatever.

Explanation:

If the input string does not contain any '1', output '1' (since the sum can't be one).

If the input string is 3 characters long, the position of the first one can be 0 or 2, the sum can't be zero, and only '1 1' has sum two (but the first '1' is at position zero).

If the input string is longer, we don't care, the sum will be bigger than one and bigger than the position of the first '1'.

PHP, 17 bytes

<?=1-join($argv);

Run like this:

echo '<?=1-join($argv);' | php -- 0 0
> 1

Explanation

This just concatenates the arguments. The first argument (script name) contains -. So that results in a negative number, which I negate with the minus sign. Then I add 1, just in case the first input number is a 0 (0123 = 123).

05AB1E, 1 byte

Q

Works the same as the RProgN answer.

Checks if a and b are the same. If so, print 1. Otherwise, print 0

Try it online!

R, 13 bytes

sum(scan()+1)

Thanks to Jonathan Allan for his inputs !

Lua, 25 bytes

x={...}print(x[1]+x[2]+1)

Try it online!

Just a trivial A+B+1 solution.

C#, 32 bytes

Golfed

int i(int x,int y){return++x+y;}

Ungolfed

int i (int x, int y)
{
    return ++x+y; //Returns X+Y+1
}

Carrot, 3 bytes

1$$

Try it online!

(input is newline separated)

Similar to ais529's answer, except this takes care of leading zeroes. This outputs 1 concatenated with both the input numbers. So 5\n6 outputs 156.

Alternate solutions:

6 bytes

1$$^*1

Same thing as the above solution, but concatenates it with a copy of itself. So 5\n6 becomes 156 which then becomes 156156.

8 bytes

#^A +1+ 

(note the trailing space, the input is space separated this time)

#^A +1+ 
#^                        //gets all of the input
  A                       //convert it an array splitting on spaces
   +1                     //add 1 to each of the array's elements
     +                    //sums up all the elements in the array

PHP, 19 bytes

1<?=max([0]+$argv);

Vim, 3 bytes/keystrokes

<C-a>gJ

Try it online!

Note that <C-a> is actually ctrl-a, which represents byte 0x01.

I love it when vim (which isn't even a programming language) can compete with golfing languages. :) Input comes in this format:

a
b

This simply increments the first number by one (This is the <C-a> part) and then joins the string representations of the two numbers together. As far as I can tell, this should never result in the sum.

Retina, 3 bytes

 
1

Try it online!

(The first line has a space before the newline. Stack Exchange isn't very good at showing trailing whitespace.)

Input is the numbers in decimal, separated by a space (e.g. 12 34). This program just changes the space to a 1, creating a number too large to be the sum of the input numbers (it necessarily has at least 2 more digits than either, and adding two numbers produces an output with no more than 1 digit more than the larger input).

Mathematica, 5 bytes

1+##&

Outputs the sum of the two arguments plus 1. For example, 1+##&[2,5] yields 8.

(Side note: Binomial almost works, although Binomial[1,0]=1 and Binomial[4,2]=6 are counterexamples; I think they're the only counterexamples, though.)

Billiards, 11 characters = 17 bytes

⇲
⇲
+
1
+
↥

Implements x + y + 1. Pretty elementary. It takes the inputs on two separate lines. (By the way, the language was modified slightly after the challenge, but only to suppress the prompt from inputting, not sure if this answer is still valid).

7 characters = 11 bytes, non-competing

This one is shorter but only possible after a new update of the language:

⇲
⇲
=
$

This uses x == y, which was shamelessly stolen from @ATaco's RProgN solution [ hope you don't mind (: ]. The $, on exit, outputs how many balls passed over it.

Turtlèd, 12 bytes

makes very large numbers

'1?:?:[1'0l]

Try it online!

Explanation:

'1                write one on the starting grid square
  ?:?:            take a number, move right that many (repeat)
      [1   ]      while not on a grid square with a one on it
        '0l       put a zero on that square, move left
[implicit output of grid]

It thus outputs 10**(x+y).

SmileBASIC, 4 bytes

!A+B

not(A)+B
1+1=2 -> !1+1 -> 0+1=1
0+1=1 -> !0+1 -> 1+1=2