problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03112
u858670323
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['#!/usr/bin/python\n# coding: utf-8\nimport os\nfrom sys import stdin, stdout\n\nif(os.getenv(\'__LOCAL__\')):\n __dirname = os.path.dirname(__file__)\n __basename = os.path.splitext(os.path.basename(__file__))[0]\n __inputname = \'./input/\' + __basename + \'.txt\'\n __outputname = \'./output/\' + __basen...
['Wrong Answer', 'Accepted']
['s728932517', 's194302510']
[23964.0, 20224.0]
[1029.0, 949.0]
[1956, 1962]
p03112
u859897687
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import bisect\n\nA,B,Q=map(int,input().split())\ninf = 10 ** 18\nS = [-inf] + [int(input()) for _ in range(A)] + [inf]\nT = [-inf] + [int(input()) for _ in range(B)] + [inf]\n\nfor q in range(Q):\n x = int(input())\n s_l = bisect.bisect_left(s,x)\n s_h = s_l + 1\n t_l = bisect.bisect_left(t,x)\n t_h = ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s272209631', 's417445547', 's247146841']
[11664.0, 11664.0, 12800.0]
[326.0, 334.0, 1684.0]
[504, 516, 506]
p03112
u860649643
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import sys\n\nA, B, Q = map(int, input().split())\nS = [int(sys.stdin.readline()) for _ in range(A)]\nT = [int(sys.stdin.readline()) for _ in range(B)]\nX = [int(sys.stdin.readline()) for _ in range(Q)]\nINF = 10**12\n\ndef binary_search(query, arr):\n arr = [-INF] + arr + [INF]\n low = 0\n high = len(arr)\n...
['Runtime Error', 'Accepted']
['s413681331', 's727896722']
[16564.0, 16256.0]
[164.0, 1591.0]
[1070, 672]
p03112
u864667985
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['def main():\n A, B, Q = list(map(int, input().split()))\n ss = [int(input()) for _ in range(A)]\n ts = [int(input()) for _ in range(B)]\n xs = [int(input()) for _ in range(Q)]\n \n for i, x in enumerate(xs):\n ss_diff = [(s-x) for s in ss]\n ts_diff = [(t-x) for t in ts]\n #prin...
['Wrong Answer', 'Accepted']
['s353516616', 's421895185']
[30940.0, 12800.0]
[2105.0, 1547.0]
[818, 587]
p03112
u869519920
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import bisect\n\na,b,q=map(int,input().split())\ns = []\nt = []\nfor i in range(a):\n s.append(int(input()))\nfor i in range(b):\n t.append(int(input()))\nfor _ in range(q):\n x = int(input())\n \n ans = [0,0,0]\n \n if x in s:\n sl = 0\n sr = 0\n else:\n i = bisect.bisect_left(s,x)\n if i == 0:\n...
['Wrong Answer', 'Accepted']
['s120187751', 's271049208']
[17116.0, 16736.0]
[2206.0, 963.0]
[743, 637]
p03112
u879870653
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['from bisect import bisect_left, bisect_right\n\nA,B,Q = map(int,input().split())\nS = sorted(list(int(input()) for i in range(A)))\nT = sorted(list(int(input()) for i in range(B)))\nX = list(int(input()) for i in range(Q))\n\n\nfor i in range(len(X)) :\n calc1 = float("inf")\n calc2 = float("inf")\n calc3 = ...
['Wrong Answer', 'Accepted']
['s139876824', 's006409770']
[16436.0, 12804.0]
[1334.0, 1890.0]
[1186, 595]
p03112
u888337853
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
["import sys\nimport re\nimport math\nimport collections\nimport bisect\nimport itertools\nimport fractions\nimport functools\nimport copy\nimport heapq\nimport decimal\nimport statistics\nimport queue\n\n# import numpy as np\n\nsys.setrecursionlimit(10 ** 9)\nINF = 10 ** 16\nMOD = 10 ** 9 + 7\n# MOD = 998244353\n\nni ...
['Runtime Error', 'Accepted']
['s608475575', 's815327960']
[19020.0, 19164.0]
[101.0, 575.0]
[1200, 1221]
p03112
u896741788
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['jin,ter,q=map(int,input().split())\njil,tel=[-float("INF")]+[int(input()) for i in range(jin)]+[float("INF")],[-float("INF")]+[int(input()) for i in range(ter)]+[float("INF")]\nfrom bisect import bisect_left as bl\nfor _ in range(q):\n x=int(input())\n ans=float("INF")\n b,d=bl(jil,x),bl(tel,x)\n for s in...
['Wrong Answer', 'Accepted']
['s892622392', 's142551243']
[12792.0, 13848.0]
[1823.0, 1755.0]
[424, 395]
p03112
u903596281
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['A,B,Q=map(int,input().split())\ns=[]\nt=[]\nfor i in range(A):\n s.append(int(input()))\nfor i in range(B):\n t.append(int(input()))\nfor i in range(Q):\n x=int(input())\n s1=s[:]\n s1.append(x)\n s1.sort()\n j=s1.index(x)\n if j==0:\n kouhoA=[s[j]]\n else:\n kouhoA=[s[j],s[j-1]]\n t1=t[:]\n t1.appen...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s591923480', 's837772194', 's309881094']
[15392.0, 13460.0, 12112.0]
[2104.0, 2104.0, 1594.0]
[1155, 1381, 1215]
p03112
u918009437
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
["if __name__ == '__main__':\n A, B, Q = map(int, input().split())\n\n s_list = [int(input()) for i in range(A)]\n t_list = [int(input()) for i in range(B)]\n x_list = [int(input()) for i in range(Q)]\n\n for xi in x_list:\n distance_ti_right_xi = [ti-xi for ti in t_list if ti >= xi]\n dist...
['Runtime Error', 'Accepted']
['s602660029', 's376942020']
[22992.0, 16144.0]
[560.0, 1205.0]
[1463, 778]
p03112
u923105140
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import bisect\nA, B, Q = map(int, input().split())\nINF = 10 ** 18\ns = [-INF] + [int(input()) for i in range(A)] + [INF]\nt = [-INF] + [int(input()) for i in range(B)] + [INF]\n\nfor q in range(Q):\n x = int(input())\n b, d = bisect.bisect_right(s, x), bisect.bisect_right(t, x)\n res = INF\n for S in [s[...
['Wrong Answer', 'Accepted']
['s498907272', 's918742089']
[15744.0, 12812.0]
[1820.0, 1694.0]
[481, 477]
p03112
u932465688
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import bisect\nA,B,Q = map(int,input().split())\na = []\nb = []\nx = []\nfor i in range(A):\n a.append(int(input()))\nfor j in range(B):\n b.append(int(input()))\nfor k in range(Q):\n x.append(int(input()))\nfor k in range(Q): \n terafirst = 0\n jinjyafirst = 0\n p = bisect.bisect_left(a,x[k])\n q = bisect.bi...
['Wrong Answer', 'Accepted']
['s109410016', 's306429555']
[16224.0, 16144.0]
[1344.0, 1445.0]
[2737, 717]
p03112
u938812966
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
[' from bisect import bisect\n A,B,Q=map(int, input().split())\n s=[int(input()) for _ in range(A)] + [99**99]\n t=[int(input()) for _ in range(B)] + [99**99]\n snt=[0]*A + [99**99]\n tns=[0]*B + [99**99]\n for i in range(A):\n \tp = bisect(t, s[i])\n \tsnt[i] = min(abs(s[i] - t[p-1]), abs(s[...
['Runtime Error', 'Accepted']
['s907373674', 's449026931']
[2940.0, 20728.0]
[17.0, 1702.0]
[715, 627]
p03112
u955251526
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import bisect\na, b, q = map(int, input().split())\ns = [int(input()) for _ in range(a)]\nt = [int(input()) for _ in range(b)]\nx = [int(input()) for _ in range(q)]\nprint(s, t, x)\nfor i in x:\n si = bisect.bisect_left(s,i)\n ti = bisect.bisect_left(t,i)\n sl = 100000000000 if si == 0 else i - s[si-1]\n ...
['Wrong Answer', 'Accepted']
['s836997917', 's621173611']
[21888.0, 17956.0]
[963.0, 954.0]
[544, 529]
p03112
u968846084
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import bisect\na,b,q=map(int,input().split())\nA=[-10**11]\nfor i in range(a):\n A.append(int(input()))\nA.append(10**11)\nprint(A)\nB=[-10**11]\nfor i in range(b):\n B.append(int(input()))\nB.append(10**11)\nfor i in range(q):\n x=int(input())\n c=bisect.bisect_left(A,x,hi=len(A))\n print(c)\n d=bisect.bisect_...
['Wrong Answer', 'Accepted']
['s797078739', 's813356794']
[14352.0, 13364.0]
[1975.0, 1893.0]
[586, 566]
p03112
u969190727
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import bisect\na,b,q=map(int,input().split())\nS,T=[],[]\nfor i in range(a):\n S.append(int(input()))\nfor i in range(b):\n T.append(int(input()))\ndef f(list,n):\n if n<list[0]:\n return [-float("inf"),list[0]]\n elif list[-1]<n:\n return [list[-1],float("inf")]\n else:\n i=bisect.bisect_left(list,n)\n...
['Runtime Error', 'Accepted']
['s098007805', 's241686984']
[12208.0, 12188.0]
[1612.0, 735.0]
[572, 610]
p03112
u970197315
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['#ABC119 D - Lazy Faith\nfrom bisect import bisect_left,bisect_right\nsi = lambda: input()\nni = lambda: int(input())\nnm = lambda: map(int, input().split())\nnl = lambda: list(map(int, input().split()))\n\na,b,q = map(int, input().split())\nINF = 10**11\nS = [-INF]+[int(input()) for _ in range(a)]+[INF]\nT = [-INF]+[...
['Runtime Error', 'Runtime Error', 'Accepted']
['s626427758', 's698522092', 's225090737']
[16144.0, 2940.0, 16132.0]
[1203.0, 17.0, 1212.0]
[667, 24, 502]
p03112
u977389981
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import bisect\n\na, b, q = map(int, input().split())\nS = [int(input()) for i in range(a)]\nT = [int(input()) for i in range(b)]\nX = [int(input()) for i in range(q)]\n\nfor i in range(q):\n id = bisect.bisect_left(S, X[i])\n if id == 0:\n s = S[id]\n elif id == len(S):\n s = S[id - 1]\n els...
['Wrong Answer', 'Accepted']
['s887275894', 's894573665']
[16156.0, 13860.0]
[1040.0, 1808.0]
[1515, 571]
p03112
u978313283
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import bisect\nimport numpy as np\nINF=10**18\nA,B,Q=map(int,input().split())\ns=[int(input()) for i in range(A)]\nt=[int(input()) for i in range(B)]\ns=[-INF]+s+[INF]\nt=[-INF]+t+[INF]\ns=np.array(s)\nt=np.array(t)\nfor q in range(G):\n X=int(input())\n t1=bisect.bisect_right(t,X)\n l1=X-t[t1]\n if (t[t1...
['Runtime Error', 'Accepted']
['s225434863', 's322714812']
[21812.0, 12800.0]
[487.0, 1689.0]
[602, 459]
p03112
u983918956
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
["from bisect import bisect, bisect_left\ninf = float('inf')\n\nA,B,Q = map(int,input().split())\nS = [-inf] + [int(input()) for _ in range(A)] + [inf]\nT = [-inf] + [int(input()) for _ in range(B)] + [inf]\nX = [int(input()) for _ in range(Q)]\n\ndef solve(x):\n si = bisect(S,x)\n sl,sr = S[si-1],S[si]\n ti =...
['Wrong Answer', 'Accepted']
['s565552709', 's122095896']
[16128.0, 16144.0]
[1110.0, 1112.0]
[552, 584]
p03112
u994988729
2,000
1,048,576
Along a road running in an east-west direction, there are A shrines and B temples. The i-th shrine from the west is located at a distance of s_i meters from the west end of the road, and the i-th temple from the west is located at a distance of t_i meters from the west end of the road. Answer the following Q queries: ...
['import bisect\n\na,b,q=map(int,input().split())\ntem=[-10**18]+[int(input()) for _ in range(a)]+[10**18]\nshr=[-10**18]+[int(input()) for _ in range(b)]+[10**18]\nans=[]\n\nfor _ in range(q):\n x=int(input())\n t=bisect.bisect_right(tem, x)\n s=bisect.bisect_right(shr, x)\n dt=[x-tem[t-1], tem[t]-x]\n ...
['Wrong Answer', 'Accepted']
['s870900515', 's866350256']
[18000.0, 17808.0]
[958.0, 772.0]
[636, 851]
p03125
u000557170
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['# -*- coding: utf-8 -*-\n\ndef parse_input():\n line = [int(e) for e in input().split(" ")]\n a = line[0]\n b = line[1]\n\n returnr (a, b)\n\n\ndef solve(a, b):\n\n result = 0\n if b % a == 0:\n result = a + b\n else:\n result = b - a\n\n return str(result)\n\ndef main():\n \n...
['Runtime Error', 'Runtime Error', 'Accepted']
['s561031592', 's834350797', 's979286806']
[3060.0, 3064.0, 3064.0]
[18.0, 18.0, 18.0]
[393, 559, 608]
p03125
u012914970
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A,B = map(int,input().split())\n\nif A%B == 0:\n print(A+B)\nelse:\n print(B-A)\n', 'A,B = map(int,input().split())\n\nif A%B == 0:\n print(A+B)\nelse:\n print(B-A)\n', 'A,B = map(int,input().split())\n\nif 0<A<21 and 0<B<21:\n if A%B == 0:\n print(A+B)\n else:\n print(B-A)\nelse :\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s038760132', 's686425317', 's765930120', 's515341017']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[81, 81, 145, 145]
p03125
u013408661
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a=map(int,input().split())\nif a[1]%a[0]==0:\n print(a[0]+a[1])\nelse:\n print(a[1]-a[0])', 'a=list(map(int,input().split()))\nif a[1]%a[0]==0:\n print(a[0]+a[1])\nelse:\n print(a[1]-a[0])']
['Runtime Error', 'Accepted']
['s049022503', 's126529448']
[2940.0, 2940.0]
[18.0, 17.0]
[91, 97]
p03125
u014333473
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['def check(A):\n check_result = []\n for i in range(1, len(A)):\n check_result.append(list(set(A[i-1])&set(A[i])))\n if len(check_result) != len(A):\n return check_result\n return False\n\nN, M = map(int, input().split())\nA = [list(map(int, input().split())) for _ in range(N)]\nfor i in range(len(A)):\n A[...
['Runtime Error', 'Accepted']
['s729409775', 's610890856']
[3188.0, 9080.0]
[17.0, 27.0]
[491, 53]
p03125
u016567570
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A, B = map(int, input().split())\n\nif B // A != 0:\n print(B - A)\nelse:\n print(A+B)', 'A, B = map(int, input().split())\n\nif B % A != 0:\n print(B - A)\nelse:\n print(A+B)']
['Wrong Answer', 'Accepted']
['s536241085', 's151579673']
[2940.0, 2940.0]
[17.0, 17.0]
[83, 82]
p03125
u017063101
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b=map(int,input().split())\nif a%b==0:\n print(a+b)\nelse:\n print(b-a)', 'a,b=map(int,input().split())\nif b%a==0:\n print(a+b)\nelse:\n print(b-a)']
['Wrong Answer', 'Accepted']
['s514705651', 's336021037']
[2940.0, 2940.0]
[17.0, 17.0]
[75, 75]
p03125
u024555159
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['x,y=[int(i) for i in input().split()]\n\nif x%y==0:\n\tprint(x%y)\nelse:\n\tprint(x-y)', 'x,y=[int(i) for i in input().split()]\n\nif x%y==0:\n\tprint(x+y)\nelse:\n\tprint(x-y)', 'x,y=[int(i) for i in input().split()]\n\nif x-y>0:\n A=x\n B=y\nelse:\n A=y\n B=x\n\nif A%B==0:\n\tprint(A+B)\nelse:\n\tprint(A-B)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s224045995', 's974899718', 's290285417']
[2940.0, 2940.0, 2940.0]
[18.0, 18.0, 17.0]
[79, 79, 120]
p03125
u025463382
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b = map (int , input().split())\nif b % a == 0 ;\n c = a+b\nelse;\n c = b-a\nprint (c)', 'a,b = map (int , input().split())\nif b % a == 0 ;\n c = a+b\nelse;\n c = b-a\nprint (c)', 'a,b = map (int , input().split())\nif b % a == 0 :\n c = a+b\nelse:\n c = b-a\nprint (c)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s006368606', 's968415392', 's958465173']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[89, 89, 89]
p03125
u027675217
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b = map(int, input().split())\nif a%b==0:\n print(a+b)\nelse:\n print(b-a)\n', 'a,b = map(int, input().split())\nif b%a==0:\n print(a+b)\nelse:\n print(b-a)\n']
['Wrong Answer', 'Accepted']
['s555933386', 's474718578']
[3316.0, 2940.0]
[19.0, 17.0]
[79, 79]
p03125
u033524082
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b=map(int,input().split())\nprint(a+b if a%b==0 else b-a)', 'a,b=map(int,input().split())\nprint(a+b if b%a==0 else b-a)']
['Wrong Answer', 'Accepted']
['s582924908', 's878836656']
[2940.0, 2940.0]
[17.0, 17.0]
[58, 58]
p03125
u033602950
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A, B = list(map(int,input().split()))\nif (A==0) or (B == 0);\n\tprint(A-B)\n\nelif B%A ==0 :\n\tprint(A+B)\n\nelse:\n\tprint(A-B)', 'A, B = list(map(int,input().split()))\nif A or B == 0;\n\tprint(A-B)\n\nelif B%A ==0 :\n\tprint(A+B)\n\nelse:\n\tprint(A-B)', 'A, B = list(map(int,input().split()))\n\nif B%A ==0:\n\tp...
['Runtime Error', 'Runtime Error', 'Accepted']
['s368921458', 's860700808', 's155042399']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 18.0]
[119, 112, 81]
p03125
u033627628
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b=map(int,input().split())\nprint(a+b if a%b==0 else a-b)', 'a,b=map(int,input().split())\nprint(a+b if b%a==0 else b-a)']
['Wrong Answer', 'Accepted']
['s729589806', 's196284720']
[2940.0, 2940.0]
[18.0, 17.0]
[58, 58]
p03125
u037221289
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
["import heapq\n\nN = int(input())\nA = list(map(int,input().split(' ')))\nA_min = heapq.nsmallest(2,A)\nX= A_min[0]\nY = A_min[1]\n\nwhile X > 0 and Y > 0:\n if X <= Y:\n Y -= X\n else:\n X -= Y\nprint(max(X,Y))\n", "A, B = map(int, input().split(' '))\n\nif B % A == 0:\n print(B+A)\nelse:\n print(B-A)\n ...
['Runtime Error', 'Accepted']
['s964260826', 's000935504']
[3060.0, 2940.0]
[18.0, 17.0]
[206, 95]
p03125
u041382530
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['N = int(input())\nA = input().split()\nA = [int(i) for i in A]\n\ndef yakusuu(p):\n\tA.reverse()\n\tfor i in range(1,p):\n\t\tif A[0] % A[i] == 0:\n\t\t\tA.pop(0)\n\t\t\treturn\n\telse:\n\t\treturn\ndef syou(k):\n\tA.sort()\n\tif A[0] == 0:\n\t\tA.pop(0)\n\t\tif len(A) > 1:\n\t\t\tA[k-1] = A[k-1] % A[0]\n\telse:\n\t\...
['Runtime Error', 'Accepted']
['s937047818', 's438094870']
[3064.0, 2940.0]
[18.0, 18.0]
[403, 69]
p03125
u044459372
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['import fractions\nfrom functools import reduce\n\ndef gcd_list(numbers):\n\treturn reduce(fractions.gcd,numbers)\n\nn=int(input())\nhp=list(map(int,input().split()))\nprint(gcd_list(hp))', 'a,b=map(int,input().split())\nif b%a:\n print(b-a)\nelse:\n print(b+a)']
['Runtime Error', 'Accepted']
['s586747702', 's564485043']
[5048.0, 2940.0]
[36.0, 18.0]
[177, 68]
p03125
u049182844
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b = map(int,input().split())\nif a % b == 0 :\n print(a + b)\nelse:\n print(b -a)', 'a,b = map(int,input().split())\nif b % a == 0 :\n print(a + b)\nelse:\n print(b -a)']
['Wrong Answer', 'Accepted']
['s693813351', 's348792677']
[2940.0, 2940.0]
[17.0, 17.0]
[81, 81]
p03125
u049354454
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['N = input()\nA = int(N[0])\nB = int(N[2])\n\nif B % A == 0:\n ans = B - A\nelse:\n ans = A + B\n\nprint(ans)', 'N = input().split(" ")\nA = int(N[0])\nB = int(N[1])\n\nif B % A == 0:\n ans = B - A\nelse:\n ans = A + B\n\nprint(ans)', 'N = input().split(" ")\nA = int(N[0])\nB = int(N[1])\n\nif B % A == 0:\...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s013466763', 's992991165', 's808110559']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[105, 116, 116]
p03125
u050698451
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A,B = int(input().split())\nif (B%A==0):\n print(A+B)\nelse:\n print(B-A)', 'from sys import stdin\nA, B = [int(x) for x in stdin.readline().rstrip().split()]\nif (B%A==0):\n print(A+B)\nelse:\n print(B-A)\n']
['Runtime Error', 'Accepted']
['s368806265', 's259431978']
[2940.0, 2940.0]
[18.0, 18.0]
[71, 126]
p03125
u051496905
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A, B = map(int, input().split())\nif A % B == 0:\n print(A+B)\nelse:\n print(B-A)', 'A, B = map(int, input().split())\nif B % A == 0:\n print(A+B)\nelse:\n print(B-A)']
['Wrong Answer', 'Accepted']
['s325238328', 's197357887']
[2940.0, 2940.0]
[18.0, 17.0]
[83, 83]
p03125
u054501336
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['l =input().split()\n\nl[0] = A\nl[1] = B\nif B%A == 0:\n print(A+B)\nelse:\n print(B-A)', 'l =input().split()\n\nA = int(l[0])\nB = int(l[1])\n\nif B%A == 0:\n print(A+B)\nelse:\n print(B-A)\n ']
['Runtime Error', 'Accepted']
['s559511116', 's145807617']
[2940.0, 2940.0]
[17.0, 17.0]
[86, 102]
p03125
u058348416
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b = map(int,input().split())\nif a%b == 0:\n print(a+b)\nelse:\n print(b-a)', 'a,b = map(int,input().split())\nif b%a == 0:\n print(a+b)\nelse:\n print(b-a)']
['Wrong Answer', 'Accepted']
['s295426682', 's282307803']
[3316.0, 3316.0]
[20.0, 21.0]
[79, 79]
p03125
u058592821
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a, b = (int(i) for i in input(),split())\nprint(a+b) if b%a == 0 else print(b-a)', 'a, b = (int(i) for i in input().split())\nprint(a+b) if b%a == 0 else print(b-a)']
['Runtime Error', 'Accepted']
['s186196707', 's075648174']
[2940.0, 2940.0]
[17.0, 17.0]
[79, 79]
p03125
u058861899
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b=map(int,input().split())\n\nif a%b==0:\n print(a+b)\nelse:\n print(b-a)', 'a,b=map(int,input().split())\n\nif a%b==0:\n print(a+b)\nelse:\n print(b-a)', 'a,b=map(int,input().split())\n\nif b%a!=0:\n print(b-a)\nelse:\n print(b+a)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s114776038', 's807008903', 's492827468']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[76, 76, 76]
p03125
u058882869
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b = input().split(" ")\nif int(b)%int(a)==0:\n print(int(a)+int(b)\nelse:\n print(int(b)-int(a))', 'a,b = input().split(" ")\nprint(int(a)+int(b)) if int(b)%int(a)==0 else print(int(b)-int(a))']
['Runtime Error', 'Accepted']
['s554639081', 's403810101']
[2940.0, 2940.0]
[17.0, 17.0]
[96, 91]
p03125
u062604519
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b = map(int,input().split())\ns=b/a\nif s == isinstance(s,int):\n print(a+b)\nelse:\n print(b-a)', 'a,b = map(int,input().split())\nif b%a == 0:\n print(a+b)\nelse:\n print(b-a)']
['Wrong Answer', 'Accepted']
['s453959218', 's998463668']
[2940.0, 2940.0]
[17.0, 17.0]
[95, 75]
p03125
u063073794
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b=map(int,input().split())\nif b&a==0:\n print(a+b)\nelse:\n print(b-a)', 'a,b=map(int,input().split())\nif b%a==0:\n print(a+b)\nelse:\n print(b-a)']
['Wrong Answer', 'Accepted']
['s828429386', 's916619013']
[2940.0, 2940.0]
[17.0, 17.0]
[71, 71]
p03125
u063346608
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A,B = map(int,input().split())\n\nif B / A == 0:\n\tprint(int(A + B))\nelse:\n\tprint(int(B - A))', 'A,B = map(int,input().split())\n\nif B / A == 0:\n\tprint(int(A + B))\nelse:\n\tprint(int(B - A))', 'A,B = map(int,input().split())\n\nif B / A == 0:\n\tprint(A + B)\nelse:\n\tprint(B - A)', 'A,B = map(int,input().spl...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s355073194', 's363093301', 's529204523', 's565412213', 's660587230']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 18.0, 17.0, 17.0]
[90, 90, 80, 85, 90]
p03125
u064246852
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A,B = map(int,input().split())\nprint(A+B if A % B == 0 else B-A)', 'A,B = map(int,input().split())\nprint(A+B if B % A == 0 else B-A)']
['Wrong Answer', 'Accepted']
['s257969581', 's853801680']
[2940.0, 2940.0]
[20.0, 20.0]
[64, 64]
p03125
u064408584
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
["n,m=map(int, input().split())\nmt=[0,2,5,5,4,5,6,3,7,6]\na=sorted(map(int, input().split()))\ndp=['']*(n+1)\ndp[0]='*'\nfor i in range(n+1):\n if not dp[i]:continue\n for j in a:\n if i+mt[j]<n+1:\n dp[i+mt[j]]=str(j)+dp[i]\nprint(''.join(sorted(dp[-1][:-1])[::-1]))", 'a,b=map(int, input().spl...
['Runtime Error', 'Accepted']
['s168623444', 's771653656']
[3064.0, 2940.0]
[17.0, 17.0]
[280, 66]
p03125
u066455063
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A, B = map(int, input().split())\n\nif A % B == 0:\n print(A + B)\nelse:\n print(B - A)\n ', 'A, B = map(int, input().split())\n\nif A % B == 0:\n print(A + B)\nelse:\n print(B - A)', 'A, B = map(int, input().split())\n\nif B % A == 0:\n print(A + B)\nelse:\n print(B - A)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s269997029', 's355629475', 's715343110']
[2940.0, 2940.0, 2940.0]
[17.0, 19.0, 17.0]
[93, 88, 88]
p03125
u070449185
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A,B = int(input().split())\nif(B%A==0):\n print(A+B)\nelse:\n print(B-A)', 'A,B = map(int, input().split())\nif(B%A == 0):\n print(A+B)\nelse:\n print(B-A)']
['Runtime Error', 'Accepted']
['s996399728', 's844514799']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 81]
p03125
u076996519
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['*l = map(int, open(0).read().split())\nif l[1] % l[0] == 0:\n\tprint(l[0] + l[1])\nelse:\n\tprint(l[1] - l[0])', '*l, = map(int, open(0).read().split())\nif l[1] % l[0] == 0:\n\tprint(l[0] + l[1])\nelse:\n\tprint(l[1] - l[0])']
['Runtime Error', 'Accepted']
['s354020962', 's960718905']
[2940.0, 2940.0]
[17.0, 18.0]
[104, 105]
p03125
u077498363
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
["num = int(input())\nnum_ls = sorted([x for x in map(int, input().split(' '))])\nwhile True:\n dam = []\n searchMin = [ x for x in num_ls if x != 1 ]\n for x in num_ls:\n div = x % min(searchMin)\n if div == 0:\n dam.append(x)\n else:\n dam.append(div)\n\n if num_...
['Runtime Error', 'Accepted']
['s641041261', 's853635843']
[3060.0, 2940.0]
[17.0, 18.0]
[381, 86]
p03125
u089376182
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a, b = map(int, input().split())\nprint(b-a if a%b else a+b)', 'a,b = map(int, input().split()) \nprint(b-a if a%b a+b)\n', 'a,b = map(int, input().split()) \nprint(b-a if a%b else a+b)\n', 'a,b = map(int, input().split()) \nprint(b-a a%b a+b)', 'a,b = map(int, input().split()) \nprint(b-a if b%a else a+b)\n']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s427481112', 's588089734', 's605775407', 's614776712', 's473587401']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[59, 55, 60, 51, 60]
p03125
u093033848
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['from fractions import gcd\n\nn = int(input())\ne = [int(i) for i in input().split()] \n\n\nanswer = 5000000000000000000000000000000000\n\ne.sort(reverse=True)\nfor i in range(0,n-2):\n for j in e[i+1:n-1]:\n if gcd(e[i],j) < answer:\n answer = gcd(e[i],j)\n \nprint(answer)', 'a, b = ma...
['Runtime Error', 'Accepted']
['s832471051', 's500634143']
[5048.0, 2940.0]
[36.0, 17.0]
[291, 89]
p03125
u094191970
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['ii=lambda:int(input())\nmiis=lambda:map(int,input().split())\nlmiis=lambda:list(:map(int,input().split()))\n\na,b=miis()\nprint(a+b if b%a==0 else b-a)', 'from sys import stdin\nnii=lambda:map(int,stdin.readline().split())\nlnii=lambda:list(map(int,stdin.readline().split()))\n\na,b=nii()\nprint(a+b if b%a==0 else b-a...
['Runtime Error', 'Accepted']
['s169336412', 's827694333']
[2940.0, 9164.0]
[17.0, 29.0]
[146, 159]
p03125
u095756391
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['\ndef f(a, b):\n if (b % a == 0):\n return a + b \n else:\n return b - a ', 'm = list(map(int, input().split()))\n\nhp = list(map(int, input().split()))\nresult = 0\ncheckyakusuru = []\ncheckodd = []\ncheckeven = []\n\nif (hp.count(hp[0]) == m[0]):\n result = hp[0]\n\nminhp = min(hp)\n\nfor p i...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s299745853', 's546114148', 's883319807', 's385078876']
[2940.0, 3064.0, 3064.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[88, 517, 535, 145]
p03125
u096635831
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['[a, b] = read().split().map(int)\nprint(a + b if b % a == 0 else b - a)\n', '[a, b] = map(int, input().split())\nprint(a + b if b % a == 0 else b - a)\n']
['Runtime Error', 'Accepted']
['s105011160', 's621984143']
[2940.0, 2940.0]
[17.0, 18.0]
[71, 73]
p03125
u098026648
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A,B = map(int, input().split())\nprint(B/A)\nif B%A == 0:\n print(A+B)\nelse:\n print(B-A)', 'A,B = map(int, input().split())\nif B%A == 0:\n print(A+B)\nelse:\n print(B-A)']
['Wrong Answer', 'Accepted']
['s103236814', 's044334795']
[2940.0, 2940.0]
[17.0, 17.0]
[91, 80]
p03125
u101742684
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['import fraction\nfrom functools import reduce\n\n\ndef gcd_list(numbers):\n return reduce(fraction.gcd, numbers)\n\n\nN = input()\nA = input().split()\nfor i in range(len(A)):\n A[i] = int(A[i]) \nprint("{}".format(gcd_list(A)))', 'A, B = map(int, input().split())\nif B%A==0:\n print("{}".format(A+B))\nelse:...
['Runtime Error', 'Accepted']
['s692463976', 's992770932']
[3060.0, 2940.0]
[17.0, 17.0]
[222, 106]
p03125
u102242691
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['\na,b = map(int,input().split())\n\nif a % b == 0:\n print(a+b)\nelse:\n print(b-a)\n', '\na,b = map(int,input().split())\n\nif b % a == 0:\n print(a+b)\nelse:\n print(b-a)\n']
['Wrong Answer', 'Accepted']
['s524946607', 's958555560']
[2940.0, 2940.0]
[17.0, 17.0]
[84, 84]
p03125
u104740664
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A, B = map(int, input().split(" "))\nif A % B == 0:\n print(A + B)\nelse:\n print(B - A)', 'A, B = map(int, input().split(" "))\nif B % A == 0:\n print(A + B)\nelse:\n print(B - A)']
['Wrong Answer', 'Accepted']
['s369968668', 's404128833']
[2940.0, 3316.0]
[17.0, 21.0]
[86, 86]
p03125
u106181248
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['x, y = map(int,input().split()))\n \nif b%a == 0:\n print(a+b)\nelse:\n print(b-a)', 'a, b = map(int,input().split())\n \nif b%a == 0:\n print(a+b)\nelse:\n print(b-a)']
['Runtime Error', 'Accepted']
['s761088164', 's651526588']
[2940.0, 2940.0]
[17.0, 17.0]
[80, 79]
p03125
u112002050
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A, B = map(int,input().split())\nif B % A == 0:\n print(A+B)\n else:\n print(B-A)\n ', 'A, B = list(map(int,input().split()))\nif B % A == 0:\n print(A+B)\nelse:\n print(B-A)\n']
['Runtime Error', 'Accepted']
['s159741917', 's211978493']
[2940.0, 2940.0]
[17.0, 17.0]
[84, 85]
p03125
u112317104
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a, b = list(map(int(), input()))\nprint(a+b if b%a == 0 else b-a)', 'a, b = list(map(int, input().split()))\nprint(a+b if b%a == 0 else b-a)\n']
['Runtime Error', 'Accepted']
['s237056130', 's599700200']
[2940.0, 2940.0]
[18.0, 17.0]
[64, 71]
p03125
u115284827
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['from collections import Counter;N, M = map(int, input().split());print(len([i for i in Counter([flatten for inner in [i[1:] for i in [[int(i) for i in input().split()] for i in range(N)]] for flatten in inner]).most_common() if i[1] == N]))', 'A, B = map(int, input().split())\nprint(A+B if B%A == 0 else B-A)']
['Runtime Error', 'Accepted']
['s615579317', 's442624274']
[3316.0, 2940.0]
[21.0, 17.0]
[240, 64]
p03125
u116233709
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['n,m=map(int,input().split())\nans=[0]*m\nfor i in range(n):\n x=[int(a),for a in input().split()]\n for j in range(1,x[0]+1):\n ans[x[j]-1]+=1\n \nprint(ans.count(n)) \n \n', 'a,b=map(int,input().split())\nif b%a==0:\n print(a+b)\nelse:\n print(b-a)']
['Runtime Error', 'Accepted']
['s634800174', 's661129406']
[2940.0, 2940.0]
[17.0, 17.0]
[172, 71]
p03125
u123745130
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['x,y=map(int,input().split())\nprint([y-x,x+y][y//x == 0] )', 'x,y=map(int,input().split())\nprint([y-x,x+y][y%x==0])']
['Wrong Answer', 'Accepted']
['s775709884', 's841346980']
[2940.0, 2940.0]
[17.0, 17.0]
[57, 53]
p03125
u124025116
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['x,y = map(int,input().split())\nif x >= y and x % y == 0:\n print(str(x + y))\nelse:\n print(str(y - x))', 'x,y = map(int,input().split())\nif x % y == 0:\n print(str(x + y))\nelse:\n print(str(x - y))', 'x,y = map(int(input()))\nif x % y == 0:\n print(str(x + y))\nelse:\n print(str(x - y))', 'x,y = map(int,inp...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s083335153', 's500479879', 's506584550', 's828521512', 's970123396']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 18.0]
[102, 91, 84, 91, 91]
p03125
u125205981
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['from sys import stdin\n\ndef main():\n A, B = map(int, input().split())\n\n if A % B:\n print(B - A)\n else:\n print(A + B)\n\ninput = lambda: stdin.readline()\nmain()\n', 'from sys import stdin\n\ndef main():\n A, B = map(int, input().split())\n\n if B % A:\n print(B - A)\n els...
['Wrong Answer', 'Accepted']
['s121648767', 's304035898']
[2940.0, 2940.0]
[17.0, 18.0]
[180, 180]
p03125
u129978636
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['n=int(input())\na=sorted(list(map(int,input().split())))\ni=0\nwhile(a[1] != 0):\n a[i+1]=a[i+1]-(a[i+1]//a[i])*a[i]\n a=sorted(a)\n if(a[0] == 0):\n i += 1\n while(a[1] != 0):\n a[i+1]=a[i+1]-(a[i+1]//a[i])*a[i]\n a=sorted(a)\nprint(a[i+1])', 'n=int(input())\na=sorted(lis...
['Runtime Error', 'Runtime Error', 'Accepted']
['s118039406', 's690557673', 's676010883']
[3064.0, 3064.0, 2940.0]
[17.0, 17.0, 18.0]
[275, 208, 77]
p03125
u131264627
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['n, m = map(int, input().split())\ncnt = [0] * m\nfor _ in range(n):\n k, *a = map(int, input().split())\n for A in a:\n cnt[A - 1] += 1\nprint(sum(c == n for c in cnt))\n', 'a, b = map(int, input().split())\nif b % a == 0:\n print(a + b)\nelse:\n print(b - a)']
['Runtime Error', 'Accepted']
['s288711260', 's573915408']
[2940.0, 2940.0]
[17.0, 17.0]
[176, 83]
p03125
u133347536
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a = int(input())\nb = int(input())\nif b % a == 0:\n print(a + b)\nelse:\n print(b-a)', 'a, b = list(map(int, input().split()))\nif b % a == 0:\n print(a + b)\nelse:\n print(b-a)\n']
['Runtime Error', 'Accepted']
['s041254712', 's837190880']
[2940.0, 2940.0]
[18.0, 17.0]
[82, 92]
p03125
u133356863
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b=map(input().split())\nprint(a+b if b%a==0 else b-a)', 'a,b=map(int,input().split())\nprint(a+b if b%a==0 else b-a)']
['Runtime Error', 'Accepted']
['s417549364', 's611666404']
[2940.0, 2940.0]
[17.0, 17.0]
[54, 58]
p03125
u133966084
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a=int(input())\nb=int(input())\nif b%a==0:\n print(a+b)\nelse:\n print(b-a)', 'a,b=(map(int, input().split()))\nif b%a==0:\n print(a+b)\nelse:\n print(b-a)']
['Runtime Error', 'Accepted']
['s861054937', 's970828957']
[2940.0, 2940.0]
[17.0, 18.0]
[74, 76]
p03125
u143051858
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A,B = map(int,input().split())\nif B%A==1:\n print(A+B)\nelse:\n print(A-B)', 'A,B = map(int,input().split())\nif B%A==0:\n print(A+B)\nelse:\n print(B-A)']
['Wrong Answer', 'Accepted']
['s612303880', 's016193633']
[2940.0, 2940.0]
[18.0, 17.0]
[73, 73]
p03125
u143322814
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['import fractions\nfrom functools import reduce\n\nN = int(input())\nA = list(map(int,input().split()))\n\ndef gcd(*numbers):\n return reduce(fractions.gcd, numbers)\n\nprint(gcd(*A))', 'A,B = map(int,input().split())\n\nif int(B % A) == 0:\n print(A+B)\nelse:\n print(B-A)']
['Runtime Error', 'Accepted']
['s720518674', 's819304479']
[5048.0, 2940.0]
[35.0, 17.0]
[176, 87]
p03125
u146305092
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a, b = map(int, input().split())\nif b%a==0:;print(a+b)\nelse:;print(b-a)', 'a, b = map(int, input().split())\nif b%a==0:\n print(a+b)\nelse:\n print(b-a)']
['Runtime Error', 'Accepted']
['s606685581', 's418372435']
[2940.0, 2940.0]
[17.0, 17.0]
[71, 79]
p03125
u149284596
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b = map(int ,input().split())\nif a%b == 0:\n print(a+b)\nelse :\n print(b-a)', 'a,b = map(int ,input().split())\nif b%a == 0:\n print(a+b)\nelse :\n print(b-a)']
['Wrong Answer', 'Accepted']
['s362957079', 's817029729']
[2940.0, 2940.0]
[17.0, 18.0]
[89, 89]
p03125
u153094838
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['# -*- coding: utf-8 -*-\n"""\nCreated on Sat Feb 16 20:59:16 2019\n\n@author: doppe\n"""\n\nN, M = map(int, input().split())\nlikeList = []\n\nfor i in range(0, N):\n L = [int(i) for i in input().split()]\n likeListTmp = []\n if (i == 0):\n likeList = L\n else:\n for j in range(1, L[0] + 1):...
['Runtime Error', 'Accepted']
['s198236072', 's771825128']
[3064.0, 2940.0]
[17.0, 17.0]
[431, 175]
p03125
u154143730
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a, b = (int(i) for i in input().split()) \n \nif a/b % 0:\n\tc = a + b\nelse:\n\tc = b - a\n \nprint(c)\n', 'a, b = (int(i) for i in input().split()) \n \nif a/b == 0:\n\tc = a + b\nelse:\n\tc = b - a\n \nprint(c)\n', 'a, b = (int(i) for i in input().split()) \n \nif b/a % 0:\n\tc = a + b\nelse:\n\tc = b ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s629959211', 's633177852', 's934705219', 's189362881']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[100, 101, 100, 89]
p03125
u158126367
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['n, m = [int(c) for c in input().split()]\n \nk = [list(map(int, input().split())) for _ in range(n)]\n \nfood_count = [0] * m\n \nfor p in k:\n for i in range(1, len(p)):\n food_count[p[i]-1] += 1\n \ncount = 0\nfor f in food_count:\n if f == n:\n count += 1\n \nprint(count)\n', 'a,b = map(int, in...
['Runtime Error', 'Accepted']
['s846391415', 's262512931']
[3060.0, 2940.0]
[17.0, 18.0]
[281, 80]
p03125
u158628538
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b=map(int,input().split())\nif(a%b==0):\n print(a+b)\nelse:\n print(b-a)', 'a,b=map(int,input().split())\nif(int(b%a)==0):\n print(a+b)\nelse:\n print(b-a)']
['Wrong Answer', 'Accepted']
['s455075932', 's790952246']
[2940.0, 2940.0]
[17.0, 17.0]
[76, 81]
p03125
u167751176
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
["def main():\n\ts = input().strip()\n\ta = s[0]\n\tb = s[1]\n\tif (b/a)*a == b:\n\t\tprint(a+b)\n\telse:\n\t\tprint(b-a)\n\nif __name__ == '__main__':\n\tmain()", "def main():\n\ta,b = map(int, input().split())\n\tif (b %= a) == 0:\n\t\tprint(a+b)\n\telse:\n\t\tprint(b-a)\n\nif __name__ == '__main__':\n\tmain()", "def...
['Runtime Error', 'Runtime Error', 'Accepted']
['s379236552', 's794782778', 's270845627']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 19.0]
[139, 132, 131]
p03125
u170201762
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A,B = map(int,inpit().split())\nif B%A==0:\n print(A+B)\nelse:\n print(B-A)', 'A,B = map(int,input().split())\nif B%A==0:\n print(A+B)\nelse:\n print(B-A)']
['Runtime Error', 'Accepted']
['s557787633', 's829836763']
[2940.0, 2940.0]
[18.0, 17.0]
[77, 77]
p03125
u170920398
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a = int(input())\nb = int(input())\nif b % a == 0:\n print (a + b)\nelse:\n print (b - a)', "a, b = map(int, input().split(' '))\nif b % a == 0:\n print (a + b)\nelse:\n print (b - a)"]
['Runtime Error', 'Accepted']
['s292274235', 's999098036']
[2940.0, 2940.0]
[17.0, 18.0]
[86, 88]
p03125
u171366497
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
["n,m=map(int,input().split())\na=list(map(int,input().split()))\na.sort(reverse=True)\nnum=[0,2,5,5,4,5,6,3,7,6]\ncanmake=dict()\nb=[]\nfor i in a:\n b.append(num[i])\n if num[i] not in canmake.keys():\n canmake[num[i]]=i\nb.sort()\nc=[]\nd=[]\namari=n%b[0]\nlongest=n//b[0]\nif amari==0:print(str(b[0])*(n...
['Runtime Error', 'Accepted']
['s303596038', 's944761175']
[3192.0, 2940.0]
[18.0, 18.0]
[1079, 65]
p03125
u173374079
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['#!/usr/bin/python\n# coding: UTF-8\na,b = map(int,input().split())\n\nif a % b == 0:\n print(a+b)\nelse:\n print(b-a)', '#!/usr/bin/python\n# coding: UTF-8\na,b = map(int,input().split())\n\nif b % a == 0:\n print(a+b)\nelse:\n print(b-a)']
['Wrong Answer', 'Accepted']
['s298571528', 's523283100']
[2940.0, 2940.0]
[17.0, 17.0]
[112, 112]
p03125
u175590965
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
["a,b = map(int,input().split('/'))\nif b%a ==0:\n print(a+b)\nelse:\n print(b-a)\n ", 'a,b = map(int,input().split())\nif b%a ==0:\n print(a+b)\nelse:\n print(b-a)\n ']
['Runtime Error', 'Accepted']
['s753271769', 's422650749']
[2940.0, 2940.0]
[18.0, 17.0]
[86, 83]
p03125
u177411511
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a, b = map((int, input().split()))\nprint(a + b if b % a == 0 else b-a)', 'a, b = map(int, input().split())\nprint(a + b if b % a == 0 else b - a)']
['Runtime Error', 'Accepted']
['s738224282', 's214269607']
[2940.0, 2940.0]
[17.0, 18.0]
[70, 70]
p03125
u177756077
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['N=int(input())\nA=list(map(int,input().split()))\n\nwhile len(set(A))!=1:\n\n A.sort()\n for i in range(len(A)-1):\n if A.count(0):\n A.remove(0)\n break\n A[i+1]=A[i+1]%A[0]\n\nprint(max(A))', 'N=int(input())\nA=list(map(int,input().split()))\n\nwhile len(set(A)!=1:\n\n A...
['Runtime Error', 'Runtime Error', 'Accepted']
['s544919125', 's673500342', 's356029984']
[3060.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[240, 239, 70]
p03125
u178192749
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a.b = map(int, input().split())\nif b%a == 0:\n print(a+b)\nelse:\n print(b-a)', 'a,b = map(int, input().split())\nif b%a == 0:\n print(a+b)\nelse:\n print(b-a)\n']
['Runtime Error', 'Accepted']
['s235775372', 's037133588']
[2940.0, 2940.0]
[17.0, 18.0]
[76, 77]
p03125
u179169725
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A, B = list(map(int, input().split()))\n\nif A % B == 0:\n print(A + B)\nelse:\n print(B-A)', 'A, B = list(map(int, input().split()))\n\nif B % A == 0:\n print(A + B)\nelse:\n print(B-A)\n']
['Wrong Answer', 'Accepted']
['s050445735', 's529235968']
[2940.0, 2940.0]
[17.0, 17.0]
[92, 93]
p03125
u189479417
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A, B = map(int,input().split())\nans = A+B if A % B == 0 else B-A\nprint(ans)', 'A, B = map(int,input().split())\n\nif B % A == 0:\n print(A + B)\nelse:\n print(B - A)']
['Wrong Answer', 'Accepted']
['s077796472', 's404905280']
[3064.0, 9124.0]
[18.0, 28.0]
[75, 87]
p03125
u197300773
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['import sys\n\ndef chk(i,j):\n tmp=[p[i][k] for k in range(M)]\n tmp[j]=p[i][j]+1\n for k in range(M-1,-1,-1):\n if tmp[k] > p[i+x[j]][k] :\n p[i+x[j]]=[tmp[k] for k in range(M)]\n\nN,M=map(int,input().split())\nx=[0,2,5,5,4,5,6,3,7,6]\na=list(map(int,input().split()))\na.sort()\nb=[]\nfor i...
['Runtime Error', 'Accepted']
['s723382831', 's342127285']
[3064.0, 2940.0]
[18.0, 18.0]
[767, 58]
p03125
u198758525
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a = [int(x) for x in input().split()]\nprint(a[0] - a[1])', 'a = [int(x) for x in input().split()]\nif a[1] % a[0] == 0:\n print(a[0] + a[1])\nelse:\n print(a[1] - a[0])']
['Wrong Answer', 'Accepted']
['s961785862', 's161934578']
[2940.0, 2940.0]
[17.0, 17.0]
[56, 110]
p03125
u207036582
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a, b = int(input().split())\nif b % a == 0 : print(a+b)\nelse : print(b-a)', 'a, b = map(int, input().split())\nif b % a == 0 : print(a+b)\nelse : print(b-a)\n']
['Runtime Error', 'Accepted']
['s509275248', 's064971273']
[2940.0, 2940.0]
[17.0, 17.0]
[72, 78]
p03125
u207075364
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['a,b=map(int,input().split())\nif b/a == 0:\n print(a+b)\nelse:\n print(b-a)\n', 'a,b=map(int,input().split())\nif b%a == 0:\n print(a+b)\nelse:\n print(b-a)\n']
['Wrong Answer', 'Accepted']
['s995551900', 's046401868']
[2940.0, 2940.0]
[17.0, 17.0]
[74, 74]
p03125
u207464563
2,000
1,048,576
You are given positive integers A and B. If A is a divisor of B, print A + B; otherwise, print B - A.
['A,B = map(int,input().split())\nx = A + B if A % B == 0 else B - A\nprint(x)', 'A,B = map(int,input().split)\nx = A + B if A % B == 0 else B - A\nprint(x)', 'A,B = map(int,input().split())\nx = A + B if B % A == 0 else B - A\nprint(x)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s735175261', 's906696383', 's507158143']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[74, 72, 74]