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,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(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(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 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())
print(A+B if B%A==0 else A-B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


a, b = LI()
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:
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 b//a:
    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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    a, b = LI()
    if a % b == 0:
        print(a+b)
        return
    print(b-a)


main()

Submission status: Wrong Answer

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    a, b = LI()
    if a % b:
        print(a+b)
        return
    print(b-a)


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:

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


if __name__ == "__main__":
    main()

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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
[a, b] = map(int, input().split())
print(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:
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(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:
4,12
a,b = map(int, raw_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(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 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 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 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())
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 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:
from fractions import gcd
a, b = map(int, input().split())
if gcd(a, b) != 1:
  print(b-a)
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 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 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:
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 b%a==0 else a-b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
    print(1)
elif b % a == 0:
    print(a + b) 
else:
    print(b-a)

Submission status: Wrong Answer

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

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:
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 = map(int,input().split())
ans = A+B if A % B == 0 else B-A
print(ans)

Submission status: Wrong Answer

Solution code:
a,b = list(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 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 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==1:
  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("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("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 B / A == 0:
	print(int(A + B))
else:
	print(int(B - A))

Submission status: Wrong Answer

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

if B / A == 0:
	print(A + B)
else:
	print(int(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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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(B+A)
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 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:
a,b = list(map(int, input().split()))
print(b // a if b % a == 0 else b - a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input_val = input().split()
A=int(input_val[0])
B=int(input_val[1])
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 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 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 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 = 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 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:
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())
print(a+b if a % b 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())

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 (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())

BDA = B%A

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

Submission status: Wrong Answer

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

BDA = B%A

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

Submission status: Wrong Answer

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

BDA = B//A

if isinstance(BDA, int) == True:
    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 a-b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a,b =map(int,input().split())
if (b/a).is_integer():
    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 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:
from sys import stdin
input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
 
 
def cast(a, b):
    return int(str(a)+str(b))
 
 
n, m = mi()
match = [2,5,5,4,5,6,3,7,6]
arr = lmi()
dp = [-1 for i in range(n+1)]
dp[0] = 0
for i in range(n):
    if dp[i] != -1:
        for j in arr:
            if i+match[j-1] <= n:
                tmp = cast(j, dp[i])
                if tmp > dp[i+match[j-1]]:
                    dp[i+match[j-1]] = tmp
print(str(dp[-1])[:-1])

Submission status: Wrong Answer

Solution code:
from sys import stdin, exit

input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1,b//2):
    if b%i == 0:
        divisor.append(i)

if a == b:
    print(a+b)
elif a in divisor:
    print(a+b)
else:
    print(b-a)

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
print(a-b if a%b else 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 round(B%A) == 0:
  print(A + B)
else:
  print(A-B)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if round(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:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')

n,k=map(int,input().split())

if (n%k)==0:
	print(0)
else:
	print(1)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    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, input().split())
    if B%A != 0:
        print(A+B)
    else:
        print(B - A)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    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(B+A if B%A else B-A)

Submission status: Wrong Answer

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

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(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=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:
  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=map(int,input().split())
if a % b == 0:
    print(a+b)
else:
   print(b-a)

Submission status: Wrong Answer

Solution code:
a,b=input().split()
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: 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()))
print(a+b if a%b==0 else a-b)

Submission status: Wrong Answer

Solution code:

A, B=map(int,input().split())

N = A % B

if N==0:
  Ans = A+B
else:
  Ans = B-A

  
  
print(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 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 int(B)//int(A) == 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(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(int(A+B))
else:
    print(int(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(b+a*(2*(1-b%a)-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().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())
C = B%A
if (C == 0):
  print(A+B)
else:
  print(A-B)

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
C = A%B
if (C == 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())
x = A + B if A % B == 0 else B - A
print(x)

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 a%b==0:
    out = a+b
else:
    out = b-a

print(out)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
print([y-x,x+y][y//x == 0] )

Submission status: Wrong Answer

Solution code:
a = int()
b = int()

1 <= a <= b <=20

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 = int()
b = int()

1 <= a <= b <=20

a,b=(int(x) for x 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 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(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 b%a == 0:
  print(a+b)
elif b%a != 0:
  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(B%A == 0 and 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:
#!/usr/bin/python
# coding: UTF-8
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())

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

elif b%a!=0:
    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 = [ int(v) for v in input().split() ]

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
input = sys.stdin.readline

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 == 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%B ==0:
    print(int(A+B))
else:
    print(int(B-A) )

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
if B == 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:
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()))
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 == b / a:
  print(a+b)
else:
  print(a-b)

Submission status: Wrong Answer

Solution code:
t, x = map(int,input().split())

print(t / x)

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 B % A == 0:
    print(A + B)
else:
    print(A - B)

Submission status: Wrong Answer

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

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

if __name__ == "__main__":
    solve()

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]=list(map(int,input().split()))
         
if(A%B==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 = map(int, input().split())

if b % 1 == 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
import sys
N,M = map(int,stdin.readline().rstrip().split())
if N == 0:
    print(1)
    sys.exit()
list = [ set(stdin.readline().rstrip().split()[1:]) for _ in range(0,N)]
print(list)
fav = list[0]
for i in range(1,N):
    fav = fav.intersection(list[i])
print(len(fav))

Submission status: Wrong Answer

Solution code:
A,B=input().split()
a=int(A)
b=int(B)
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 = map(int, input().split())
print(A+B) if B%A == 0 else print(A-B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for i in range(B):
    if B == 0:
        print(A + B)
        exit()
    if i == 0:
        continue
    if B % (A*i) == 0:
        print(A + B)
        exit()
print(B - A)

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for i in range(B):
    if i == 0:
        continue
    if B % (A*i) == 0:
        print(A + B)
        exit()
print(B - A)

Submission status: Wrong Answer

Solution code:
a=list(input().split())
b=int(a[0])
c=int(a[1])
if b%c==0:
  print(b+c)
else:
  print(c-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 = list(map(int, input().split()))
print((A+B) if B%A else (B-A))