Problem:


Score : 100 points

Problem Statement

You are given positive integers A and B.

If A is a divisor of B, print A + B; otherwise, print B - A.

Constraints

All values in input are integers.

1 \leq A \leq B \leq 20

Input

Input is given from Standard Input in the following format:

A B

Output

If A is a divisor of B, print A + B; otherwise, print B - A.

Sample Input 1

4 12

Sample Output 1

16

As 4 is a divisor of 12, 4 + 12 = 16 should be printed.

Sample Input 2

8 20

Sample Output 2

12

Sample Input 3

1 1

Sample Output 3

2

1 is a divisor of 1.



Sample input:
4 12


Sample output:
16

Submission status: Wrong Answer

Solution code:
a, b = map(int, raw_input().split())
if (a%b) == 0:
  print a + b
else:
  print b - a

Submission status: Wrong Answer

Solution code:
def solve(m_list):
    m_val = m_list[0]
    for i in m_list:
        m_val = min(m_val,gcd(min_val,m))
    return min_val

def gcd(a,b):
    while b:
        a,b = b,a%b
    return a

def main():
    n = int(input())
    m_list = list(map(int,input().split()))

    ans = solve(m_list)
    print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

if (a%b == 0):
    print(a-b)
else:
    print(a+b)

Submission status: Wrong Answer

Solution code:
A, B =map(int, input().split())
if B//A==0:
  print(B+A)
else:
  print(B-A)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if B % A == 0:
    print(B%A)
else :
    print(B - A)

Submission status: Wrong Answer

Solution code:
a=list(input().split())
b=int(a[0])
c=int(a[1])
if c%b==0:
  print(b+c)
else:
  print(b-c)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if A%B == 0:
  print(A+B)
else:
  print(B-A)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())

C = B
while C-A >= 0:
    C -= A
    
if C == 0:
    print(A+B)
else:
    print(A-B)

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    a,b = LI()
    if a%b == 0:
        print(a+b)
    else:
        print(b-a)
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == "__main__":
    A()

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if A % B == 0:
    print(A + B)
else:
    print(B - A)

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
if b%a == 0:
  print(a+b)
else:
  print(a-b)

Submission status: Wrong Answer

Solution code:
A=input()
print(A)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if A%B == 0:
    print(A+B)
else:
    print(B-A)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if b%a:
  print(a+b)
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if(b%2 == 0):
  print(a+b)
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
A, B=map(int, input().split())

if B%A==0:
    print(A+B)
else:
  print(A-B)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
if b//a:
    print(a+b)
else:
    print(b-a)

Submission status: Wrong Answer

Solution code:
a,b =map(int,input().split())
if b//a:
    print(a+b)
else:
    print(a-b)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
print(a+b if b%a else b-a)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

if B % A == 0:
  print(A + B)
else:
  print(A - B)

Submission status: Wrong Answer

Solution code:
def math(A,B):
    if A%B ==0:
        print(A+B)
    else:
        print(B-A)
A,B = tuple(map(int, input().split()))

math(A,B)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().split())
if(B%A == 0):
  print(A+B)
else:
  print(A-B)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

if A % B == 0:
	print(A + B)
else:
	print(B-A)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

if A % B == 0:
	print(A - B)
else:
	print(B-A)

Submission status: Wrong Answer

Solution code:
A,B = (int(i) for i in input().split())
if B%A==0:
    print(A+B)
else:
    print(A-B)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
print(A+B if A % B == 0 else B-A)

Submission status: Wrong Answer

Solution code:
def ans():
  a, b = map(int,input().split())
  if(a%b == 0):
    print(a+b)
  else:
    print(b-a)
ans()

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if a%b==0:
  print(a+b)
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(A-B)

Submission status: Wrong Answer

Solution code:
S = list(map(int,input().split()))
A = S[0]
B = S[1]
if A ==1:
    print(A-B)
elif int(B/A)==B/A:
    print(A+B)
else:
    print(A-B)

Submission status: Wrong Answer

Solution code:
S = list(map(int,input().split()))
A = S[0]
B = S[1]
if int(B/A)==B/A:
    print(A+B)
else:
    print(A-B)

Submission status: Wrong Answer

Solution code:
A, B = list(map(int,input().split()))
if (A==0) or (B == 0):
	print(A-B)

elif B%A ==0:
	print(A+B)

else:
	print(A-B)

Submission status: Wrong Answer

Solution code:
A, B = list(map(int,input().split()))
if B%A ==0 :
	print(A+B)
else:
	print(A-B)

Submission status: Wrong Answer

Solution code:
A, B = [int(i) for i in input().split()]

if B % A == 0:
  print(A + B)
else:
  print(A - B)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
A = a[0]
B = a[1]
if A % B == 0:
    print(str(A+B))
else:
    print(str(B-A))

Submission status: Wrong Answer

Solution code:
A,B=(int(i) for i in input().split())
if B%A==0:
  print(A+B)
else:
  print(A-B)

Submission status: Wrong Answer

Solution code:
A,B=(int(i) for i in input().split())
if A%B==0:
  print(A+B)
else:
  print(A-B)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if a%b==0:
  print(a+b)
else:
  print(a-b)

Submission status: Wrong Answer

Solution code:
a, b = [int(x) for x in input().split(" ")]
if a % b == 0:
  print(a+b)
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

if (B % A) == 0:
  print(A + B)
else:
  print(A - B)

Submission status: Wrong Answer

Solution code:
A,B=map(int, input().split())
if B%A==0:
    print(A+B)
else:
    print(A-B)

Submission status: Wrong Answer

Solution code:
def divisor(A, B):
    if A==1:
        return A + B
    if B==1:
        return B-A
    if B % A == 0:
        return A + B
    return B - A

Submission status: Wrong Answer

Solution code:
def divisor(A, B):
    if A==1 or B==1:
        return B-A
    if B % A == 0:
        return A + B
    return B - A

Submission status: Wrong Answer

Solution code:
A, B=map(int, input().split())
print(A+B if B%A==0 else A-B)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if b/a == 0:
  print(a+b)
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
def solve(a, b):
    return (a+b) if (b % a == 0) else (a-b)
a, b = map(int, input().split())
print(solve(a,b))

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

if b / a == 0:
  print(a + b)
else:
  print(b - a)

Submission status: Wrong Answer

Solution code:
i = [int(each) for each in input().split()]

a = i[0]
b = i[1]

if b % a == 0:
    print(a + b)
else:
    print(a - b)

Submission status: Wrong Answer

Solution code:
a,b = (int(x) for x in input().split())
if b % a == 0:
  print(a+b)
else:
  print(a-b)

Submission status: Wrong Answer

Solution code:
A, B = [int(s) for s in input().split(' ')]

if A % B == 0:
  print(A + B)
else:
  print(B - A)

Submission status: Wrong Answer

Solution code:
A, B = [int(s) for s in input().split(' ')]

if A % B:
  print(A + B)
else:
  print(B - A)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

if(b%a == 0):
    print(a+b)
else:
    print(a-b)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if B % A == 0:
    print(A+B)
else:
    print(A - B)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if A % B == 0:
    print(A+B)
else:
    print(A - B)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
if (a + b) % 2:
  print(b - a)
else:
  print(b + a)

Submission status: Wrong Answer

Solution code:
a, b = (int(x) for x in input().split())

if b % a == 0:
	print(a+b)

else:
	print(a-b)

Submission status: Wrong Answer

Solution code:
list1 = [int(a) for a in input().split()]
list1_0 = list1[0]
list1_1 = list1[1]

if (list1_0 % list1_1) == 0:
    print(list1_0 + list1_1)
else:
    print(list1_1 - list1_0)

Submission status: Wrong Answer

Solution code:
list1 = [int(a) for a in input().split()]
list1_0 = list1[0]
list1_1 = list1[1]

print(list1_0 + list1_1)
print(list1_1 - list1_0)

Submission status: Wrong Answer

Solution code:
list1 = [int(a) for a in input().split()]
list1_0 = int(list1[0])
list1_1 = int(list1[1])

print(list1_0 + list1_1)

Submission status: Wrong Answer

Solution code:
list1 = [int(i) for i in input().split()]
list1_0 = int(list1[0])
list1_1 = int(list1[1])

print(list1_0 + list1_1)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

if a % b == 0:
  print(a + b)
else:
  print(b - a)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    a, b = map(int, raw_input().split(" "))
    if b % a:
        print(str(a + b))
    else:
        print(str(b - a))

Submission status: Wrong Answer

Solution code:
x,y=[int(i) for i in input().split()]

if x%y==0:
	print(x+y)
else:
	print(x-y)

Submission status: Wrong Answer

Solution code:
x,y=[int(i) for i in input().split()]

if x%y==0:
	print(x%y)
else:
	print(x-y)

Submission status: Wrong Answer

Solution code:
a = 2
a += 6
print(a)

Submission status: Wrong Answer

Solution code:
input()
a = 2 + 6
print(a)

Submission status: Wrong Answer

Solution code:
a = 2 + 6
print(a)

Submission status: Wrong Answer

Solution code:
a = 2
a = a + 6
print(a)

Submission status: Wrong Answer

Solution code:
a = 2
a += 16
print(a)

Submission status: Wrong Answer

Solution code:
a = 2 + 16
print(a)

Submission status: Wrong Answer

Solution code:
a = 4 + 12
print(a)

b = 20 - 8
print(b)

c = 1 + 1
print(c)

Submission status: Wrong Answer

Solution code:
a = 4
a += 12
print(a)

b = 20
b -= 8
print(b)

c = 1
c += 1
print(c)

Submission status: Wrong Answer

Solution code:
import sys

c = sys.stdin.readline()
d = c.split()
A = int(d[0])
B = int(d[1])
if B % A == 0:
    print(str(B - A))
else:
    print(str(A - B))

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a % b == 0:
  print(a + b)
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())

if type(b/a) is not int:
    print(b-a)
else:
    print(a+b)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())

if a % b == 0:
  print(a + b)
 
else:
  print(b - a)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())

if a % b == 0:
  print(a + b)
 
else:
  print(a - b)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if b%a == 0:
    print(a+b)
else:
    print(a-b)

Submission status: Wrong Answer

Solution code:

def main(A, B):
	
	if A%B == 0:
		return A+B
	else:
		return B-A


stdin = input().split(' ')
stdin = [ int(c) for c in stdin]
print(main(stdin[0], stdin[1]))

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

print(a + b if b % a == 0 else a - b)

Submission status: Wrong Answer

Solution code:
a,b = list(map(int, input().split()))

if b % a == 0:
  print(b - a)
else:
  print(b + a)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if x >= y and x % y == 0:
  print(str(x + y))
else:
  print(str(y - x))

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if x % y == 0:
  print(str(x + y))
else:
  print(str(y - x))

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if x % y == 0:
  print(str(x + y))
else:
  print(str(x - y))

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split(' '))
if b%a == 0:
    print(a+b)
else:
    print(a-b)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split(" "))

if(b%a):
  print(a+b)

else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
import sys
import collections
input_lines = sys.stdin.readlines()

N = input_lines[0].strip()[0]
N = N.strip()
N = int(N)

new = []
for i in range(1,len(input_lines)):
  tmp = input_lines[i].strip()
  tmp = tmp.split()
  for j in range(len(tmp)-1):
	  new.append(tmp[j+1])
      
c = collections.Counter(new)


cnt = 0
for k in range(len(c.most_common())):
  if int(c.most_common()[k][1]) == N:
    cnt += 1
  else:
    break
    
print(cnt)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a % b == 0:
    print(a + b)
else:
    print(a -b)

Submission status: Wrong Answer

Solution code:
N = input().split(" ")
A = int(N[0])
B = int(N[1])

if B % A == 0:
    ans = B - A
else:
    ans = A + B

print(ans)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

if (b % a) == 0:
    print(a+b)
else:
    print(b-1)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
 
if A % B == 0:
  print(A+B)
else:
  print(B-A)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().rstrip().split(" "))
num = b / a
if num == int(num):
  print(int(num))
else:
  print(b - a)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def main():
  a, b = map(int, input().split())

  if a * b > 0 and abs(a) < abs(b) and b % a == 0:
    print(b + a, flush=True)
  else:
    print(b - a, flush=True)


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
x = input()
A,B = x.split(" ")
A,B = int(A),int(B)
print(B + A) if A%B == 0 else print(B - A)

Submission status: Wrong Answer

Solution code:
from sys import stdin

def main():
    A, B = map(int, input().split())

    if A % B:
        print(B - A)
    else:
        print(A + B)

input = lambda: stdin.readline()
main()

Submission status: Wrong Answer

Solution code:
A, B = [int(_) for _ in input().split()]
if A % B:
    print(B - A)
else:
    print(A + B)

Submission status: Wrong Answer

Solution code:
from sys import stdin

a, b = stdin.readline().rstrip().split()
a, b = int(a), int(b)

for i in range(1, 21):
    if a * i > b:
        break

    if b % (a * i) == 0:
        print(a + b)
        break
else:
    print(b - a)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

if a % b ==0:
	print(a + b)
else:
	print(b - a)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
if A%B==0:
  print(A+B)
else:
  print(B-A)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
print(a+b if a%b==0 else b-a)

Submission status: Wrong Answer

Solution code:
A, B = input().split()
if int(A) % int(B) == 0:
    print(int(A) - int(B))
else:
    print(int(B) - int(A))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split(" "))

if B % A == 0:
  print("A+B")
else:
  print("B-A")

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a % b == 0:
    c= a + b
    print(c)
else:
    d = b - a
    print(d)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a % b == 0:
    c= a + b
    print(c)
else:
    d = a - b
    print(d)

Submission status: Wrong Answer

Solution code:
ab=input().split()
a=int(ab[0])
b=int(ab[1])
if isinstance(b/a,int):
  print(str(a+b))
else:
  print(str(b-a))

Submission status: Wrong Answer

Solution code:
# AtCoderBeginnersSelection
# ABC083B - Some Sums


def yakusuu(n):
    array = []
    for i in range(1,n):
        if n % i == 0:
            array.append(i)
    return array

a, b = map(int, input().split())

yakusuuList = yakusuu(b)

if a in yakusuuList:
    ans = a + b
else:
    ans = b - a

print(str(ans))

Submission status: Wrong Answer

Solution code:
from sys import stdin


def a_minus_b_or_b_minus_a(a, b):
    if b % a == 0:
        return a + b
    else:
        return a - b

def main():
    input_line = stdin.readline().rstrip()
    a, b = [int(num_string) for num_string in input_line.split(' ')]
    answer = a_minus_b_or_b_minus_a(a, b)
    print(answer)


#if __name__ == '__main__':
main()

Submission status: Wrong Answer

Solution code:
ab=input().split()
a=int(ab[0])
b=int(ab[1])
if isinstance(b/a,int):
  print(str(a+b))
else:
  print(str(a-b))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if A%B==0:
    print(A+B)
else:
    print(B-A)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
if a[1] % a[0] == 0:
  b = a[0] + a[1]
if a[1] % a[0] != 0:
  b = a[1] + a[0]
print(b)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())

if 0<A<21 and 0<B<21:
    if A%B == 0:
        print(A+B)
    else:
        print(B-A)
else :
    print("error")

Submission status: Wrong Answer

Solution code:
A,B = map(int, input().split())
print(B/A)
if B%A == 0:
    print(A+B)
else:
    print(B-A)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(A-B)

Submission status: Wrong Answer

Solution code:
from sys import stdin


def a_minus_b_or_b_minus_a(a, b):
    if b % a == 0:
        return a + b
    else:
        return a - b

def main():
    input_line = stdin.readline().rstrip()
    a, b = [int(num_string) for num_string in input_line.split(' ')]
    answer = a_minus_b_or_b_minus_a(a, b)
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a,b=[int(x) for x in input().split()]
if a%b==0:
    print(a+b)
else:
    print(b-a)

Submission status: Wrong Answer

Solution code:
inputString = input('Enter a string:')
#inputString = "4 12"
nums = []
for num in inputString.split(" "):
    nums.append(int(num))

if(nums[1]%nums[0]==0):
    print(nums[0]+nums[1])
else:
    print(nums[1]-nums[0])

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

if a % b == 0:
    ans = a + b
else:
    ans = b - a

print(str(ans))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

if B % A == 0:
    print(A + B)
else:
    print(A - B)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if B % A ==0:
    print(A+B)
else:
    print(A-B)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

if a % b == 0:
    ans = a + b
else:
    ans = a - b

print(str(ans))

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())

if A%B == 0:
    print(A+B)
else:
    print(B-A)

Submission status: Wrong Answer

Solution code:
A, B = (int(i) for i in input().split())  
if A%B == 0:
  print(A + B)
else:
  print(B - A)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
if B//A:
    print(A+B)
else:
    print(B-A)

Submission status: Wrong Answer

Solution code:
a,b=(int(x) for x in input().split())

if b//a==0:
  print(a+b)
  
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
def judge(A,B):
   if A%B == 0:
       print(A+B)
   else:
       print(B-A)
judge(A,B)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if A % B ==0:
    print(A+B)
else:
    print(B-A)

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
print([a+b,b-a][b%a==0])

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# A
#
# input
a, b = map(float,input().split())
# calc output
if b % a == 0:
  print(a+b)
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
a,b=(int(x) for x in input().split())

if a//b==0:
  print(a+b)
  
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python3

a, b = map(int, input().split())
#
if b % a == 0:
  print(a + b)
else:
  print(a - b)

Submission status: Wrong Answer

Solution code:
A, B = list(map(int, raw_input().split()))

if B % A == 0: print str(A+B)
else: print str(A-B)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

if A % B == 0:
    print(A + B)
else:
    print(B - A)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

if b&a == 0:
  print(a+b)
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

if A % B == 0:
  print(A+B)
else:
  print(A-B)

Submission status: Wrong Answer

Solution code:
a, b=[int(i) for i in input().split()]
n=0
for i in range(1,20):
    if b == a*i:
        n = n+1
if n ==0:
    print(b-a)
if n==1:
    print(a+b)

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().strip().split(' '))

amari = A % B

if amari == 0:
    print(A + B)
else:
    print(B - A)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

def main():
    sp = [int(e) for e in input().split(" ")]
    a = sp[0]
    b = sp[1]
    if b%a == 0:
        print(a+b)
    else:
        print(a-b)

main()

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if B % A == 0 and B >= A:
    print(A+B)
else:
    print(A-B)

Submission status: Wrong Answer

Solution code:

def f(a, b):
    if (b % a == 0):
        return a + b 
    else:
        return b - a

Submission status: Wrong Answer

Solution code:
a,b=[int(i) for i in input().split()]

if a % b == 0:
	print(a + b)
else:
	print(b-a)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

if A // B == 0:
    print(A + B)
else:
    print(B - A)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

if a % b == 0:
    print (a + b)
else :
    print(b - a)

Submission status: Wrong Answer

Solution code:
a = [int(x) for x in input().split()]
print(a[0] - a[1])

Submission status: Wrong Answer

Solution code:
A, B = map(int,input().strip().split(' '))

amari = B % A

if amari == 0:
    print(A + B)
else:
    print(A - B)

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())  
  
if a/b == 0:
	c = a + b
else:
	c = b - a
    
print(c)

Submission status: Wrong Answer

Solution code:
def main():
	a,b = map(int, input().split())
	if (b/a)*a == b:
		print(a+b)
	else:
		print(b-a)

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())

if a%b==0:
    print(a+b)
else:
    print(b-a)

Submission status: Wrong Answer

Solution code:
a,b = list(map(int,input().split()))
if b%a == 0:
  print(a+b)
else:
  print(a-b)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split(" "))
if B % A == 0:
  print(A + B)
else:
  print(A - B)

Submission status: Wrong Answer

Solution code:
def solve():
    ans1, ans2 = map(int, input('数字を入れる\n').split(' '))
    if ans2 % ans1 == 0:
        print(ans1 + ans2)
    else:
        print(ans2 - ans1)

solve()

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(a-b)

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))

for i in range(20):
    if a * i == b:
        print(a + b)
        exit()
print(b - a)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
for i in range(a+1):
    if a*i == b:
        print(a+b)
        exit()
print(b-a)

Submission status: Wrong Answer

Solution code:
A, B = list(map(int, input().split()))

if A % B == 0:
    print(A + B)
else:
    print(B-A)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())

if B // A != 0:
  print(B - A)
else:
  print(A+B)

Submission status: Wrong Answer

Solution code:
#-*- coding: utf-8 -*-
"""
https://yahoo-procon2019-qual.contest.atcoder.jp/tasks/yahoo_procon2019_qual_a
"""


def sol(a, b):
    if b % a == 0: return a+b
    else: return a-b


test = False
#test = True
if test:
    n, k = 3, 2
    #S =list( map(int, "1 6 3".split()))
    print(sol(n, k))

    n, k = 5, 5
    #S =list( map(int, "7 4 0 3".split()))
    print(sol(n, k))
    #
    n, k = 31, 10
    #S =list( map(int, "1000000000000".split()))
    print(sol(n, k))

    n, k = 10, 90
    #S =list( map(int, "1000000000000".split()))
    print(sol(n, k))

else:
    a, b = map(int, input().split())
    #S =list( map(int, input().split()))
    print(sol(a, b))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
print(A+B) if B%A==2 else print(B-A)

Submission status: Wrong Answer

Solution code:
a, b = [int(x) for x in input().rstrip("\n").split(" ")]

if b % a == 0:
  print(a + b)
else:
  print(a - b)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

if a%b==0 :
   print(a+b)
else :
   print(b-a)

Submission status: Wrong Answer

Solution code:
a,b = map(int ,input().split())
if a%b == 0:
        print(a+b)
else :
        print(b-a)

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
if a % b == 0:
    print(a+b)
else:
    print(b-a)

Submission status: Wrong Answer

Solution code:
a,b = [int(i) for i in input().split(" ")]
if(b//a == 0):
  print(a+b)
else:
  print(b-a)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if b%a==0: print(a+b)
else: print(a-b)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
A, B = list(map(int, input().split()))

if A % B == 0:
    print(A + B)
else:
    print(B - A)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
print(a+b if b%a == 0 else a-b)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
print((a + b) if a % b == 0 else (b- a))

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if B % A == 0:
    print(A + B)
else:
    print(A - B)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
print(a+b if a%b==0 else b-a)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a%b == 0:
    print(a+b)
else:
    print(b-a)

Submission status: Time Limit Exceeded

Solution code:
def inpl(): return list(map(int, input().split()))

MLE = [[0]*10000 for _ in [0]*10000]

A, B = inpl()
print([A+B, B-A][B%A > 0])

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
print(a+b if b%a==0 else b-a)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if b % a == 0:
    print(a+b)

else:
    print(b-a)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
  
print(a+b if b % a == 0 else b-a)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a+b if b % a == 0 else b-a)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))

if((a[1]%a[0]) == 0):
    print(a[0] + a[1])
else:
    print(a[1] - a[0])

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))

if a[1] % a[0] == 0:
    print(a[0]+a[1])

else:
    print(a[1]-a[0])

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if B % A == 0:
  print(A+B)
else:
  print(B-A)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if b%a == 0 :
    print(a+b)
else :
    print(b-a)

Submission status: Accepted

Solution code:
# A -B+/-A
a, b = map(int, input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

if b % a ==0:
    print(a+b)

else:
    print(b-a)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(a+b if b%a==0 else b-a)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if b%a == 0:
  print(a+b)
else:
  print(b-a)

Submission status: Accepted

Solution code:
a,b=map(int, input().split())

if b%a==0:
    print(a+b)
    
else:
    print(b-a)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)

Submission status: Accepted

Solution code:
a,b=map(int,input().split(" "))
print([a+b,b-a][b%a>0])

Submission status: Accepted

Solution code:
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, b = Input()
    print(a+b if b%a==0 else b-a)

main()

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if B%A==0:
    print(A+B)
else:
    print(B-A)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
print(a+b if b%a == 0 else b-a)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if b % a == 0:
  print(a + b)
else:
  print(b - a)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

print(A+B if B%A==0 else B-A)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if B % A == 0:
    print(A + B)
else:
    print(B - A)

Submission status: Accepted

Solution code:
def resolve():
    A, B = list(map(int, input().split(" ")))
    print(A+B if B%A==0 else B-A)

if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if B % A == 0:
    print(A+B)
else:
    print(B-A)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if B % A == 0:
    print(A + B)
else:
    print(B - A)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if B % A == 0:
    print(A + B)
else:
    print(B - A)