TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int, input().split()))
print(A+B if B%A==0 else B-A)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a, b = map(int, input().rstrip().split(" "))
num = b / a
if num == int(num):
  print(int(num))
else:
  print(b - a)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
from fractions import gcd

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

a = sorted(A)
B = [a[0]]
C = []
for i in range(1,N):
    x = a[i]%a[0]
    if x != 0:
        B.append(x)
b =sorted(B)
for i in range(len(b)-1):
    y = math.gcd(b[i],b[-1])
    C.append(y)
    
if len(b) == 1:
    print(b[0])
else:
    print(min(C))

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b=map(int,input().split())

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

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

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


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

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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = map(int, input().split())

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


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

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

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

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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
from fractions import gcd
a, b = map(int, input().split())
if gcd(a, b) != 1:
  print(b-a)
else:
  print(a+b)


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


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

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
N, M = map(int, input().split())
useful_num_list = list(map(int, input().split()))

need_matches = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]

dp = [-1] * (N+1)
dp[0] = 0
for i in range(1, N+1):
    max_scale = -1
    for num in useful_num_list:
        if need_matches[num] <= i:
            scale = dp[i-need_matches[num]] + 1
            if max_scale < scale:
                max_scale = scale
    dp[i] = max_scale

useful_num_list.sort(reverse=True)
ans =""
n = N
while n > 0:
    ans_scale = ""
    for num in useful_num_list:
        if dp[n] - 1 == dp[n - need_matches[num]]:
            ans_scale = str(num)
            n -= need_matches[num]
            break
    ans += ans_scale
print(ans)


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

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


Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
def main()
  a = input()
  b = input()

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



a = input()
b = input()

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

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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int, input().split())
print(A+B if A%B == 0 else B-A)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B=map(int,input().split())
if A%B=0:
  print(A+B)
else:
  print(B-A)

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
n, m = map(int, input().split())
a = list(map(int, input().split()))

dp = dict.fromkeys(range(n + 1))  
dp[0] = 0

num = {1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 3, 8: 7, 9: 6}
anum = sorted(
    dict(filter(lambda e: e[0] in a, num.items())).items(), reverse=True
)  

for i in range(n):
    dp[i + 1] = -float("inf")
    for e in anum:
        if i + 1 - e[1] >= 0:
            dp[i + 1] = max(dp[i + 1], dp[i + 1 - e[1]] + 1)

ans = ""
while dp[n] > 1:
    for e in anum:  
        if n - e[1] >= 0:
            if dp[n - e[1]] == dp[n] - 1:
                ans += str(e[0])
                n -= e[1]
                break


ans += str(list(filter(lambda e: e[1] == n, anum))[0][0])

print(ans)


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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int, input().split())

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

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

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


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

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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
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)

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B = map(int, input().split())

BDA = B/A

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a = input()
b = input()

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

import sys
input_lines = sys.stdin.readlines()
a,b = input_lines.split( )

a = int(a)
b = int(b)

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


import sys
input_lines = sys.stdin.readlines()
a,b = input_lines.split( )

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

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)

import sys
input_lines = sys.stdin.readline()
a,b = input_lines.split( )

a = int(a)
b = int(b)

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
#!/usr/bin/env python3

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

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



#!/usr/bin/env python3

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

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



#!/usr/bin/env python3

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

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


    



Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
n,k=map(int,input().split())
print(n+k if n%k ==0 else k-n)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a, b = list(map(int, input().split()))
print([a+b,b-a][b%a==0])

a,b=[int(i) for i in input().split()];print([a+b,b-a][b%a!=0])

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a, b = list(map(int, input().split()))
if a % b == 0:
    print(a+b)
else:
    print(b-a)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a=list(input().split())
b=int(a[0])
c=int(a[1])
if a%b==0:
  print(b+c)
else:
  print(c-b)

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


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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B=map(int,input().split())
print(A+B if A%B==0 else B-A)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

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


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
n, m = map(int, input().split(' '))
_, *intersection = map(int, input().split(' '))
intersection = set(intersection)
for _ in range(1, n):
    _, *newlist = map(int, input().split(' '))
    intersection = intersection & set(newlist)
print(len(intersection))

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int, input().split(' '))
if B % A == 0:
    print(A + B)
 else:
    print(B - A)

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a = 2
a = a + 6
print(a)

a = 2
a += 6
print(a)

list1 = [int(a) for a in input().split()]
list1_0 = list1[0] #AB
list1_1 = list1[1] #BC
list1_2 = list1[2] #CA

if (list1_0 * list1_1 // 2) > 1:
    print(list1_0 * list1_1 // 2)
else:
    print(list1)

a = 4
a += 12
print(a)

b = 20
b -= 8
print(b)

c = 1
c += 1
print(c)


a = 2
a += 6
print(a)

input()
a = 2 + 6
print(a)

a = 2 + 6
print(a)

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)

a = 2
a += 16
print(a)

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)


a = 2 + 16
print(a)

a = 4 + 12
print(a)

b = 20 - 8
print(b)

c = 1 + 1
print(c)

list1 = [int(a) for a in input().split()]
list1_0 = list1[0] #A
list1_1 = list1[1] #B

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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B = map(int,input().split())
C = A%B
if (C == 0):
  print(A+B)
else:
  print(A-B)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

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


Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
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()


import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int, input().split())
if A % B == 0:
    print(A + B)
else:
    print(B - A)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a, b = map(int, ' '.split(input()))
if b%a == 0:
  print(a+b)
else:
  print(b-a)

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = map(int,input().split())
if b//a==0:
    print(a+b)
else:
    print(b-a)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
N, M = map(int, input().split())
A = list(map(int, input().split()))
honsuu = [0,2,5,5,4,5,6,3,7,6]
aval = []
for a in A:
  aval += [honsuu[a]]
aval.sort()

dp = [0] 

for i in range(1,N+1):
  for b in aval:
    if i < b:
      continue
    else:
      dp += [dp[i-b] + 1]
      break
  else:
    dp += [0]



A.sort(reverse=True)
ans = []
for i in range(dp[N],1,-1):
  for a in A:
    if N - honsuu[a] < 0:continue
    if dp[N - honsuu[a]] == dp[N] - 1:
      N -= honsuu[a]
      ans += [a]
      break
      
final = 0
for i in range(10):
  if i in A and honsuu[i] == N:
    final = i
    break
ans += [final]
print(''.join(map(str, ans)))

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B=map(int,input().split())
if A%B==0:
  print(B+A)
else:
  print(B-A)

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


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = map(int,input().split())
if a % b == 0:
    c= a + b
    print(c)
else:
    d = b - a
    print(d)

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = list(map(int,input().strip()).split()))
ans1 = a + b
ans2 = b - a
if b % a == 0:
    print(ans1)
else:
    print(ans2)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
# -*- 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()


# -*- coding:utf-8 -*-

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

if __name__ == "__main__":
    solve()


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
import sys

argvs = sys.argv

if len(argvs) < 2:
    sys.exit(1)

try:
    a = int(argvs[1])
    b = int(argvs[2])
except TypeError:
    sys.exit(1)

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


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

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


Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A=input()
B=input()
if B%A==0:
    print(A+B)
else:
    print(B-A)

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


A=input()
print(A)

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


DATA=input()
DATA=DATA.split(" ")
A=int(DATA[0])
B=int(DATA[1])

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


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a, b = map(int, input())
if a % b == 0:
    print(a + b)
else:
    print(b - a)

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


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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int, input().split())

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


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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b=map(int,input().split())
print(a-b if a%b else a+b)


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


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
data = list(map(int,input().split()))

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

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


data = list(map(int,input().split()))

if data[1]%data[0] == 0:
    print(sum(data))
else:
    print(data[1]-data[0])


Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
import sys
stdin = sys.stdin
def li(): return map(int, stdin.readline().split())
a, b = tuple(li())
div, mod = divmod(b, a)
if mod == 0:
	return a + b
else:
    return b - a

import sys
stdin = sys.stdin
def li(): return map(int, stdin.readline().split())
a, b = tuple(li())
div, mod = divmod(b, a)
if mod == 0:
    return a + b
else:
    return b - a


import sys
stdin = sys.stdin
def li(): return map(int, stdin.readline().split())
a, b = tuple(li())
div, mod = divmod(b, a)
if mod == 0:
	return a + b
else:
	return b - a


import sys
stdin = sys.stdin
def li(): return map(int, stdin.readline().split())
a, b = tuple(li())
div, mod = divmod(b, a)
if mod == 0:
    print(a + b)
else:
    print(b - a)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a, b = map(int, input().split())

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a = int(input())
b = int(input())
r = a + b if b % a == 0 else b - a
print(r)


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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int,input().strip().split(' '))

amari = A % B

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

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

amari = B % A

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
n, m = map(int, input(),split())
if m % n :
  print(m - n)
else :
  print(n + m)
  

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
N = int(input())
HPs = list(map(int, input().split()))

while len(HPs) > 1:
    HPs.sort()
    for i in range(len(HPs)-1):
        HPs[i+1] = HPs[i+1] % HPs[0]
    while 0 in HPs:
        HPs.remove(0)

print(HPs[0])

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

Q = B/A

if Q.is_integer():
    print(A+B)
else:
    print(B-A)

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int, input().split())
if A%B == 0:
  print(A+B)
else:
  print(B-A)

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


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b=input().split()
c=a+b if b%a=0 b-a
print(c)

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B =map(int, input().split())
if B//A==0:
  print(B+A)
else:
  print(B-A)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = list(map(int, input().split()))

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

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

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


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

A,B=(int(i) for i in input().split())
2.if B%A==0:
3.  print(A+B)
4.else:
5.  print(B-A)


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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b=input().split()
if b%a==0:
  print(a+b)
else:
  print(b-a)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = map(int,input().split())

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

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b=map(int,input().split())
if b % a:
  print(a + b)
else:
  print(b-a)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a = list(map(int,input()))

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

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int, input().split())
if b%a == 0:
    print(A+B)
else:
    print(B-A)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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


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


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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a=input()
b=input()
if b%a==0:print(a+b)
else:print(b-a)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B = map(int,input().split())
if A % B == 0:
  print(A + B)
else:
  print(A-B)
  

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
n=int(input())
hoge=list(map(int,input().split()))
###
def huga(a,b):
  x=max(a,b)
  y=min(a,b)
  z=1
  for i in range(y):
    wa=y-i
    if(x%wa==0 and y%wa==0):
      z=wa
      break
  return z
###
hoge.sort(reverse=True)
ans=hoge[0]
for i in range(n-1):
  ans=huga(ans,hoge[i+1])
  
print(ans)

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B = map(int, input())
if isinstance(A / B, int):
  print(A + B)
else:
  print(B - A)


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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):

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


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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int, input().split())
if B % A == 0:
    print(B%A)
else :
    print(B - A)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = [int(s) for in input().split(' ')]

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

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

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

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

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = map(int,input().split())
if b//a ==0:
    print(a+b)
else:
    print(b-a)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = map(int(input().split()))
if b%a :
    print(b-a)
else:
    print(a+b)

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = map(int,input().split())

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b=map(int,input(),split())
print(a+b if b%a==0 else b-a)

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = list(map(int, input()))

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


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

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


Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b=map(int,input().split())

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

a,b=map(int,input().split())
c=b/a
if c.is_integer()==True:
    print(b+a)
else:
    print(b-a)

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B =map(int, input())
if B % A == 0:
  print(A+B)
else:
  print(B-A)

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


Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
###B - Foods Loved by Everyone
N, M = map(int, input().split())
kaito = []
for i in range(N):
    kaito.append([int(i) for i in input().split()])

cnt = 0
for i in range(1, M+1):
    jlist = []
    for j in range(N):
        if i in kaito[j][1:]:
            jlist.append(True)
        else:
            jlist.append(False)
    if all(jlist):
        cnt += 1
        
print(cnt)

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a, b = [int(i) for i in input().split()]

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


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

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


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B=map(int,input().split())
if A % B == 0:
  print(A+B)
else:
  print(A-B)

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = int(input().split(" "))
if (b%a == 0):
  print(a-b)
else :
  print(b-a)

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):

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

# your code goes here

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


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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B=map(int(input().split()))
if A%B==0:
    print(A+B)
else:
    print(A-B)

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
import sys

v = []
for line in sys.stdin:
  v.append(int(line))

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

import sys

v = []
for line in sys.stdin:
  v = [int(l) for l in line.split()]

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A, B = map(int, input().split())
def judge(A,B):
   if A%B == 0:
       print(A+B)
   else:
       print(B-A)
judge(A,B)

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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

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


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = int(input().split())
if b % a == 0:
    print(a+b)
else:
    print(b-a)
    

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

Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
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
  
  A, B = map(int, input().split(" "))
  print(divisor(A, B))

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

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

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

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

A, B = map(int, input().split(" "))
print(divisor(A, B))

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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


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


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b=map(int,input().split())
print(a+b if b%a else b-a)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a, b = map(int, input().split())
if b / a == 0:
  print(a + b)
else:
  print(b - a)

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b = int(input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)


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


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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a, b = map(int, input().split())

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

print(str(ans))

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

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

print(str(ans))

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

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

print(str(ans))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B = map(int,input().split())
print(A+B if A%B==0 else B-A)

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

Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
a,b=map(int,input())
ans = a+b if (b%a==0) else b-a
print(ans)

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


Verdicts: Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B = map(int,input().split())

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

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

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


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

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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

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


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


Verdicts: Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B = map(int,input().split())
 
if B//A==0:
  print(A+B)
else:
  print(A-B)

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):

using namespace std;

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



using namespace std;

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


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

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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
n, m = map(int, input().split())
favFood = [input().split() for i in range(n)]
for i in favFood:
    del i[:1]

if not(n == 1):
    count = 0
    for i in range(1, m):
        check = True
        for j in range(n):
            if not (str(i) in favFood[j]):
                check = False
        if check:
            count += 1
    print(count)

else:
    print(len(favFood))



n, m = map(int, input().split())
favFood = [input().split() for i in range(n)]
for i in favFood:
    del i[:1]
    
count = 0

for i in range(1, m):
    check = True
    for j in range(n):
        if not (str(i) in favFood[j]):
            check = False
    if check:
        count += 1

print(count)


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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
N = int(input())
A = list(map(int,input().split()))
while len(A) > 1:
    a_ = A[0]
    for x in range(1,len(A)):
        A[x] %= a_
    A = [ans for ans in A if ans > 0]
    A.sort()
print(A[0])

N = int(input())
A = list(map(int,input().split()))
for main_loop in range (0,N):    
    A.sort()
    de = A.count(0)
    del A[:de]
    li = len(A)
    if A[0] == 1:
        break
    for x in range(1,li):
        A[x] = A[x]%A[0]
print(A[0])


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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given positive integers A and B.  If A is a divisor of B, print A + B; otherwise, print B - A.

Submission attempts (in order):
A,B=int(input())
if B%A==0:
    print(A+B)
else:
    print(B-A)

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

#-*-coding:utf-8-*-

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

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

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


n=int(input().split())
if n[1]%n[0]==0:
    print(n[0]+n[1])
else:
    print(n[1]-n[0])

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted