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: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=[int(i) for i in 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:
# -*- coding: utf-8 -*-

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

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

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

Submission status: Accepted

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

A, B = inpl()

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

Submission status: Accepted

Solution code:
import numpy as np
import math

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

Submission status: Accepted

Solution code:
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = map(int,input().split())|	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = list(map(int,input().split()))	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import collections
import math
def inpl(): return list(map(int, input().split()))

#### START
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 == B / A:
    print(A + B)
else:
    print(B - A)

Submission status: Accepted

Solution code:
import itertools
import numpy as np
import sys
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

A,B = IL()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 16 20:59:16 2019

@author: doppe
"""

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [A, B] = [int(input_raw[0]), int(input_raw[1])]
    if B % A == 0:
        print A+B
    else:
        print B-A

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

def main():
    buf = input()
    buflist = buf.split()
    A = int(buflist[0])
    B = int(buflist[1])
    if B % A == 0:
        print(A+B)
    else:
        print(B-A)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#横にn個入力
a, b = map(int, input().split())
if b % a == 0:
    print(a + b)
else:
    print(b - a)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc118/tasks/abc118_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:
x,y = map(int,input().split())
if y%x==0:
    print(x+y)
else:
    print(y-x)

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 read():
    return int(input())

def reads():
    return list(map(int, input().split()))

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

Submission status: Accepted

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


sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-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 pf(s): return print(s, flush=True)


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

main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(solve())

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:
#!/usr/bin/env python3

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

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

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

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 
a,b = map(int,input().split())

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

Submission status: Accepted

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

output = B-A

if B%A == 0:
    output = A+B

print(output)

Submission status: Accepted

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

from itertools import chain
from functools import reduce
from collections import OrderedDict, Counter, deque
import operator

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(b+a)
else:
  print(b-a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/mnt/c/Users/moiki/bash/env/bin/python
A,B = map(int, input().split())

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

Submission status: Accepted

Solution code:
import sys
A,B = [int(n) for n in input().split()]
# N = int(input())
# A = [0]*N
# for i in range(N):
#     A[i] = int(input())
# S = str(input())
# T = str(input())
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:
    print(B-A)
else:
    print(A+B)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())


#n = ip()                              #入力整数1つ
a,b= (int(i) for i in input().split())      #入力整数横2つ
#n,x,y = (int(i) for i in input().split())    #入力整数横3つ
#n,m,x,y= (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(n)]    #入力セット(整数改行あり)(2/2)

#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
if b/a == b//a:
    print(b+a)
else :print(b-a)

Submission status: Accepted

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

from collections import deque
import heapq
import math
import bisect


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: 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 = [int(x) for x in 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:
n, m = map(int, input().split())
if m % n == 0:
    print(n+m)
else:
    print(m-n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!venv/bin/python

import math
import numpy as np
import random
import copy
import statistics 

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

Submission status: Accepted

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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(b+a)
else:
    print(b-a)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def func():
    pass


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: 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 = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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


def main():
    print(solve())


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

a,b = li()

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

Submission status: Accepted

Solution code:
A, B = list(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, raw_input().strip().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(int(a+b))
else:
  print(int(b-a))

Submission status: Accepted

Solution code:
A, B = [int(i) for i in 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:
# ABC 118
import numpy as np

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

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

Submission status: Accepted

Solution code:

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

if M % N == 0 :
    print(N+M)
else :
    print(M-N)

Submission status: Accepted

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,s,n) for (int i = (s); i < (n); ++i)
#define rrep(i,n,g) for (int i = (n)-1; i >= (g); --i)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define len(x) (int)(x).size()
#define dup(x,y) (((x)+(y)-1)/(y))
#define append push_back
#define Field(T) vector<vector<T>>
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
  int a,b;
  cin >> a >> b;
  if (b%a == 0) cout << a+b << endl;
  else cout << b-a << endl;
  return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
a

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
A = []
for i in range(N):
    A.append(list(map(int, input().split())))
s = set(list(A[0]))
for i in range(1,N):
    _s = set(A[i])
    s &= _s
print(len(s))

Submission status: Runtime Error

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

a = sorted(a)
check_minn = 10 ** 10


def check(a, n, check_minn):
    minn = 10 ** 10
    for i in range(1, n):
        if minn > a[i] - a[i - 1] and a[i] - a[i - 1] != 0:
            minn = a[i] - a[i - 1]
    if minn == 10 ** 10:
        return a[0]
    for i in range(n):
        a[i] = a[i] % minn
    a = sorted(list(set(a)))
    n = len(a)
    if a == [0]:
        return minn
    minn = 10 ** 10
    for i in range(n):
        minn = min(minn, a[i])
    if minn == check_minn:
        return minn
    else:
        check_minn = minn
        return check(a, n, check_minn)


print(check(a, n, check_minn))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def check(A):
  check_result = []
  for i in range(1, len(A)):
    check_result.append(list(set(A[i-1])&set(A[i])))
  if len(check_result) != len(A):
    return check_result
  return False

N, M = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(N)]
for i in range(len(A)):
  A[i].pop(0)
while True:
  check_result = check(A)
  if check_result:
    A = check_result
  else:
    if not A[0]:
      print(0)
      break
    else:
      print(len(A[0]))
      break

Submission status: Runtime Error

Solution code:
import math.gcd
a, b = map(int, input.split())
if gcd(a, b) != 1:
  print(b-a)
else:
  print(a+b)

Submission status: Runtime Error

Solution code:
import fanctions.gcd
a, b = map(int, input.split())
if gcd(a, b) != 1:
  print(b-a)
else:
  print(a+b)

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())

d = dict()
for i in range(n):
  a,*b = list(map(int,input().split()))
  d[i] = b

x = 0
ans = 0
for j in range(1,m+1):
  for i in range(n):
    if j in d[i]:
      x += 1
    else:
      x = 0
      break
  if x == n:
    ans += 1
  else:
    ans = 0

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
　# ABC118A

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

#２整数の最大公約数を求める

def gcd2(x,y): 
    while y != 0:
        x , y = y , x % y 
    return x



#N 整数の最大公約数を求める
#A = [A[0],...,A[N]] とする

def gcd(A):
    ans = A[0]
    for i in range(1,N): #range(1,N)= 1,2,...,N-1
        ans = gcd2(ans, A[i])
    return ans
print(gcd(A))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,m = list(map(int,input().split()))
n_l = []
for i in range(n):
    l = list(map(int,input().split()))
    for j in range(l[0]):
        n_l.append(l[j+1])
    
cnt = 0
for i in range(1,m+1):
    if n_l.count(i) == n:
        cnt += 1

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
ii=lambda:int(input())
miis=lambda:map(int,input().split())
lmiis=lambda:list(:map(int,input().split()))

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

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
l = [list(map(int,input().split())) for i
     in range(N)]
for i in range(N):
  del l[i][0]

for i in range(N-1):
  a = set(l[i])&set(l[i+1])
  l[i+1] = a
print(len(a))

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
l=[]
for _ in range(n):
    k,*s=input().split()
    l+=s
se=set(l)
a=0
for i in se:
    c=l.count(i)
    if c==n:
        a+=1
print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

BDA = B/A

if isinstance(n, int) == True:
    print(A+B)
else:
    print(A-B)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
ans=[0]*m
for i in range(n):
  x=[int(a),for a in input().split()]
  for j in range(1,x[0]+1):
    ans[x[j]-1]+=1
  
print(ans.count(n))

Submission status: Runtime Error

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

count = int(data[1]/data[0])

if count > data[2]:
    print(data[2])
else:
    print(count)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())
 
A = list(map(int,input().split()))
 
A = sorted(A)[0:2]
 
INF = 10 ** 9

for i in range(0,INF):
	A[1] = A[1] % A[0]
	if A[1] < A[0]:
		A[1],A[0] = A[0],A[1]
	if A[0] <= 0:
		break
		
print(A[1])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
]
dp[0] = 0
for a in alist:
    match = matches[a]
    for i in range(n - match + 1):
        if dp[i] == -1: continue
        dp[i + match] = max(dp[i + match], dp[i] * 10 + a)
 
print(dp[-1])matches = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
 
n, m = map(int, input().split())
alist = list(map(int, input().split()))
alist.sort(reverse=True)
 
dp = [-1 for _ in range(n + 1)