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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03125 | u209275335 | 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())\nif n % m == 0:\n print(n + m)\nelse:\n print(m - n)', 'n,m = map(int,input().split())\nif m % n == 0:\n print(n + m)\nelse:\n print(m - n)'] | ['Wrong Answer', 'Accepted'] | ['s205073235', 's550126432'] | [2940.0, 2940.0] | [17.0, 18.0] | [85, 85] |
p03125 | u210987097 | 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)', 'A,B=map(int,input().split())\nif B%A==0:\n print(A+B)\nelse:\n print(B-A)'] | ['Runtime Error', 'Accepted'] | ['s983789425', 's906028329'] | [2940.0, 2940.0] | [17.0, 18.0] | [73, 71] |
p03125 | u211236379 | 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())\nfor i in range(N):\n for j in range(N-i):\n if j == N-i-1:\n print(N)\n else:\n print(N,end='')", 'A, B = map(int,input().split())\nif B % A ==0:\n print(A+B)\nelse:\n print(B-A)'] | ['Runtime Error', 'Accepted'] | ['s834116600', 's466524863'] | [2940.0, 3060.0] | [17.0, 17.0] | [146, 81] |
p03125 | u220345792 | 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())\nlife_list = list(map(int, input().split()))\nlife_list.sort()\nwhile life_list[1] - life_list[0] > 0:\n if life_list[1] == life_list[0]:\n break\n\tlife_list[1] = life_list[1] - life_list[0]\n life_list.sort()\n \nprint(life_list[0])\n\n', 'A, B = map(int, input().split())\n\nif B % A == 0:\n print(A+B)\nelse:\n print(B-A)'] | ['Runtime Error', 'Accepted'] | ['s274752647', 's546634330'] | [2940.0, 2940.0] | [17.0, 17.0] | [263, 84] |
p03125 | u225020286 | 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'] | ['s625021461', 's031681342'] | [2940.0, 2940.0] | [17.0, 17.0] | [72, 72] |
p03125 | u225110485 | 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)'] | ['Runtime Error', 'Accepted'] | ['s399475392', 's144133401'] | [2940.0, 2940.0] | [17.0, 17.0] | [85, 86] |
p03125 | u227085629 | 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())\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'] | ['s953346544', 's366853975'] | [2940.0, 3064.0] | [17.0, 17.0] | [68, 76] |
p03125 | u227476288 | 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 == B//A:\n print(A+B)\nelse:\n print(B-A)'] | ['Wrong Answer', 'Accepted'] | ['s322431154', 's025456558'] | [2940.0, 2940.0] | [18.0, 17.0] | [79, 82] |
p03125 | u228232845 | 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\n\ndef input(): return sys.stdin.readline().strip()\ndef I(): return int(input())\ndef LI(): return list(map(int, input().split()))\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef S(): return input()\ndef LS(): return input().split()\n\n\nINF = float('inf')\n\n\na, b = LI()\nif a % b == 0:\n print(a+b)\nelse:\n print(b-a)\n", "import sys\n\n\ndef input(): return sys.stdin.readline().strip()\ndef I(): return int(input())\ndef LI(): return list(map(int, input().split()))\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef S(): return input()\ndef LS(): return input().split()\n\n\nINF = float('inf')\n\n\na, b = LI()\nif b % a == 0:\n print(a+b)\nelse:\n print(b-a)\n"] | ['Wrong Answer', 'Accepted'] | ['s607774040', 's096234869'] | [9188.0, 9052.0] | [28.0, 32.0] | [411, 411] |
p03125 | u235066013 | 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()]\nif b%a==0:\n print('a+b')\nelse:\n print('b-a')", 'a,b=[int(i) for i in input().split()]\nif b%a==0:\n print(a+b)\nelse:\n print(b-a)'] | ['Wrong Answer', 'Accepted'] | ['s541158891', 's348785377'] | [2940.0, 2940.0] | [19.0, 18.0] | [84, 80] |
p03125 | u235210692 | 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 print(a+b)\nelse:\n print(b-a)', 'a,b=[int(i) for i in input().split()]\n\nif b%a==0:\n print(a+b)\nelse:\n print(b-a)'] | ['Wrong Answer', 'Accepted'] | ['s549185021', 's328011995'] | [2940.0, 2940.0] | [17.0, 17.0] | [85, 85] |
p03125 | u239301277 | 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. | ["s=input()\nif int(s[5:7])<5:\n\tprint('Heisei')\nelse:\n\tprint('TBD')", 'a,b=map(int,input().split())\nif b%a==0:\n\tprint(a+b)\nelse:\n\tprint(b-a)'] | ['Runtime Error', 'Accepted'] | ['s203802862', 's856426154'] | [2940.0, 2940.0] | [17.0, 18.0] | [64, 69] |
p03125 | u240630407 | 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());print(B+A if B%A else B-A)', 'A,B=map(int,input().split());print(B-A if A%B!=0else A+B)', 'A,B=map(int,input().split());print(B-A if B%A else A+B)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s882821537', 's947696059', 's600884605'] | [2940.0, 2940.0, 2940.0] | [19.0, 17.0, 17.0] | [55, 57, 55] |
p03125 | u249727132 | 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)'] | ['Runtime Error', 'Accepted'] | ['s283325468', 's341145943'] | [2940.0, 2940.0] | [17.0, 18.0] | [85, 86] |
p03125 | u251123951 | 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==2 else print(B-A)', 'A, B = map(int, input().split())\nprint(A+B) if B%A==0 else print(B-A)'] | ['Wrong Answer', 'Accepted'] | ['s692587689', 's678294082'] | [2940.0, 2940.0] | [19.0, 18.0] | [69, 69] |
p03125 | u252964975 | 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)', 'import math\nA,B=map(int, input().split())\nprint (B+A-2*A*math.ceil(B%A/20))'] | ['Wrong Answer', 'Accepted'] | ['s338595829', 's646753988'] | [2940.0, 2940.0] | [17.0, 17.0] | [72, 75] |
p03125 | u256833330 | 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())\nl=[]\nfor _ in range(n):\n k,*s=input().split()\n l+=s\nse=set(l)\na=0\nfor i in se:\n c=l.count(i)\n if c==n:\n a+=1\nprint(a)\n', 'a,b=map(int,input().split())\nprint(b-a if b%a else a+b)\n'] | ['Runtime Error', 'Accepted'] | ['s832142784', 's478202795'] | [2940.0, 2940.0] | [17.0, 17.0] | [166, 56] |
p03125 | u261827653 | 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'] | ['s286407347', 's425709463'] | [2940.0, 2940.0] | [18.0, 17.0] | [79, 79] |
p03125 | u261891508 | 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)'] | ['Runtime Error', 'Accepted'] | ['s828647494', 's600540729'] | [2940.0, 2940.0] | [17.0, 17.0] | [7, 58] |
p03125 | u265118937 | 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().spli())\nif b % a == 0:\n print(a + b)\nelse:\n print(b-a)', 'a, b = map(int, input().split())\nif a == b:\n print(a + b)\nelif b % a == 0:\n print(a + b) \nelse:\n print(b-a)'] | ['Runtime Error', 'Accepted'] | ['s774961584', 's113770080'] | [2940.0, 2940.0] | [17.0, 17.0] | [84, 116] |
p03125 | u268792407 | 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())\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'] | ['s189703026', 's137231862'] | [2940.0, 2940.0] | [17.0, 17.0] | [61, 74] |
p03125 | u271063202 | 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 a%b==0:\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)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s621670983', 's699154836', 's350872542'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [72, 71, 72] |
p03125 | u274615057 | 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 main():\n a, b = map(int, input().split())\n if b / a %i 0:\n print(a + b)\n else:\n print(b - a)\n\n\nif __name__ == "__main__":\n main()\n', '\ndef main():\n a, b = map(int, input().split())\n if b / a % 0:\n print(a + b)\n else:\n print(b - a)\n\n\nif __name__ == "__main__":\n main()\n', '\ndef main():\n a, b = map(int, input().split())\n if b / a == 0:\n print(a + b)\n else:\n print(b - a)\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n a, b = map(int, input().split())\n if b % a == 0:\n print(a + b)\n else:\n print(b - a)\n\n\nif __name__ == "__main__":\n main()\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s294875847', 's513765690', 's692519526', 's795705479'] | [8916.0, 9136.0, 9148.0, 9152.0] | [27.0, 24.0, 31.0, 25.0] | [161, 160, 161, 160] |
p03125 | u278260569 | 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,K = map(int,input().split())\nK_A = []\nfor i in range(N):\n\tK_A.append(list(map(int,input().split())))\n\nl = []\n\nfor i in range(N):\n\tdel K_A[i][0]\n\tfor j in range(len(K_A[i])):\n\t\tl.append(K_A[i][j])\n\t\t\ncount = 0\n\nfor i in range(K+1):\n\tif l.count(i) == N:\n\t\tcount += 1\n\nprint(count)\n', 'A,B = map(int,input().split())\nif B % A == 0:\n\tprint(A+B)\nelse:\n\tprint(B-A)'] | ['Runtime Error', 'Accepted'] | ['s056036156', 's119176944'] | [3064.0, 2940.0] | [18.0, 17.0] | [282, 75] |
p03125 | u284854859 | 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(a -b)', 'a,b = map(int,input().split())\t\nif b % a == 0:\n print(a+b)\nelse:\n print(b-a)'] | ['Wrong Answer', 'Accepted'] | ['s946581479', 's417739126'] | [2940.0, 2940.0] | [17.0, 17.0] | [84, 82] |
p03125 | u285169554 | 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(k) for k in input.split()]\nif b%a:\n print(abs(b-a))\nelse:\n print(a+b)\n ', 'a,b = [int(k) for k in input().split()]\nif b%a:\n print(abs(b-a))\nelse:\n print(a+b)'] | ['Runtime Error', 'Accepted'] | ['s580711536', 's428756676'] | [2940.0, 2940.0] | [17.0, 17.0] | [87, 84] |
p03125 | u288430479 | 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())\nl = [list(map(int,input().split())) for i\n in range(N)]\nfor i in range(N):\n del l[i][0]\n\nfor i in range(N-1):\n a = set(l[i])&set(l[i+1])\n l[i+1] = a\nprint(len(a))', 'A,B = map(int,input().split())\nif B%A == 0 :\n print(A+B)\n\nelse:\n print(B-A)'] | ['Runtime Error', 'Accepted'] | ['s650988581', 's034506715'] | [3060.0, 2940.0] | [17.0, 17.0] | [200, 77] |
p03125 | u290443463 | 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())\nreturn A+B if B % A == 0 else B-A', 'A, B = map(int, input().split())\nreturn 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', 'Runtime Error', 'Accepted'] | ['s350120099', 's546397924', 's599131453'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [66, 66, 66] |
p03125 | u294385082 | 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'] | ['s054565865', 's886586166'] | [2940.0, 2940.0] | [17.0, 18.0] | [75, 75] |
p03125 | u295621316 | 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()\na, b = int(a), int(b)\nif b % a == 0:\n print(a+b)\nelse:\n print(b-a)', 'a, b = input().split()\na, b = int(a), int(b)\nif b % a == 0:\n print(a+b)\nelse:\n print(b-a)'] | ['Runtime Error', 'Accepted'] | ['s518076743', 's045056979'] | [2940.0, 2940.0] | [17.0, 17.0] | [83, 91] |
p03125 | u297046168 | 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())\nif B%A=0:\n print(A+B)\nelse:\n print(B-A)', 'A,B = 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)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s393080025', 's822133333', 's847083220'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [64, 65, 83] |
p03125 | u297756089 | 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())\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'] | ['s756502166', 's845680331'] | [2940.0, 2940.0] | [17.0, 17.0] | [63, 72] |
p03125 | u298297089 | 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)\n'] | ['Wrong Answer', 'Accepted'] | ['s970954219', 's393824937'] | [2940.0, 2940.0] | [17.0, 17.0] | [64, 65] |
p03125 | u300968187 | 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\nfrom functools import reduce\ninput()\nprint(reduce(gcd,list(map(int,input().split()))))', 'a, b = map(int, input().split())\nprint(a + b if b % a == 0 else b - a)'] | ['Runtime Error', 'Accepted'] | ['s567421177', 's923241946'] | [5048.0, 2940.0] | [35.0, 17.0] | [112, 70] |
p03125 | u301984327 | 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(x) for x in input().split()]\nfood_list = [0 for x in range(m)]\n\nfor i in range(n):\n s = [int(x) for x in input().split()]\n k = s[0]\n e = s[1:]\n for j in range(k):\n food_list[e[j]-1] += 1\n\nans = 0\nfor i in range(m):\n if food_list[i] == n:\n ans += 1\nprint(ans)', 'a, b = [int(x) for x in input().split()]\n\nif b%a == 0:\n print(a+b)\nelse:\n print(b-a)'] | ['Runtime Error', 'Accepted'] | ['s994287188', 's206174051'] | [3060.0, 2940.0] | [17.0, 17.0] | [281, 86] |
p03125 | u304630225 | 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=input().split()\nA=int(A)\nB=int(B)\nif B%A==0:\n print(A+B)\nelse :\n print(B-A)'] | ['Runtime Error', 'Accepted'] | ['s231608584', 's328259959'] | [2940.0, 2940.0] | [17.0, 17.0] | [77, 85] |
p03125 | u305018585 | 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(' ')\n\nif b%a == 0 :\n print(b+a)\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)"] | ['Runtime Error', 'Accepted'] | ['s449058779', 's028345240'] | [2940.0, 2940.0] | [17.0, 17.0] | [73, 84] |
p03125 | u306070611 | 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. | ['data = input().split()\nA = data[0]\nB = data[1]\nif (B % A) == 0 :\n ANS = A+B\nelse:\n ANS = B - A\nprint(ANS)', 'A,B = map(int,input().split())\nif B%A == 0:\n ans = A+B\nelse:\n ans = B-A\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s439014475', 's049557500'] | [2940.0, 2940.0] | [17.0, 18.0] | [111, 88] |
p03125 | u311379832 | 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. | ['inputData1 = int(input())\ninputData2 = int(input())\nans = 0\nif inputData2 % inputData1 ==0:\n ans = inputData1 + inputData2\nelse:\n ans = inputData2 - inputData1\nprint(ans)', 'inputData1 = int(input())\ninputData2 = int(input())\nans = 0\nif inputData2 % inputData1 ==0:\n ans = inputData1 + inputData2\nelse:\n ans = inputData2 - inputData1\nprint(ans)', "inputData = input().split(' ')\nans = 0\n\nif int(inputData[1]) % input(inputData[0]) ==0:\n ans = int(inputData[0]) + int(inputData[1])\nelse:\n ans = int(inputData[1]) - int(inputData[0])\nprint(ans)", "inputData = input().split(' ')\nans = 0\n\nif int(inputData[1]) % int(inputData[0]) ==0:\n ans = int(inputData[0]) + int(inputData[1])\nelse:\n ans = int(inputData[1]) - int(inputData[0])\nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s188802039', 's766713121', 's781229324', 's937534082'] | [2940.0, 2940.0, 3060.0, 3060.0] | [17.0, 17.0, 18.0, 17.0] | [176, 176, 200, 198] |
p03125 | u313340709 | 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\nimport pprint\n\npp = pprint.PrettyPrinter(indent=4)\n\ndef main():\n """ Code implementation """\n a, b = map(int, raw_input().split())\n if b % a == 0:\n print(b + a)\n else:\n print(b - a)\n\nif __name__ == \'__main__\':\n main()\n', 'import sys\nimport pprint\n\npp = pprint.PrettyPrinter(indent=4)\n\ndef main():\n """ Code implementation """\n a, b = map(int, raw_input().split())\n if int(b) % int(a) == 0:\n\tprint(int(a) + int(b))\n else:\n\tprint(int(b)-int(a))\n\nif __name__ == \'__main__\':\n main()\n', 'import sys\nimport pprint\n\npp = pprint.PrettyPrinter(indent=4)\nrl = lambda: sys.stdin.readline().strip()\n\ndef main():\n """ Code implementation """\n a, b = rl().split()\n if int(b) % int(a) == 0:\n\tprint(int(a) + int(b))\n else:\n\tprint(int(b)-int(a))\n\nif __name__ == \'__main__\':\n main()\n', 'import sys\nimport pprint\n\npp = pprint.PrettyPrinter(indent=4)\n\ndef main():\n """ Code implementation """\n a, b = map(int, input().split())\n if b % a == 0:\n print(b + a)\n else:\n print(b - a)\n\nif __name__ == \'__main__\':\n main()\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s580542772', 's751390347', 's936081654', 's857520742'] | [3572.0, 3188.0, 2940.0, 3572.0] | [23.0, 18.0, 17.0, 23.0] | [258, 272, 297, 254] |
p03125 | u314089899 | 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. | ['\nN,M = map(int, input().split())\nA_list=[]\nfood_list=[]\n\nfor i in range(N):\n A_list.append([int(e) for e in input().split()])\n\nfor i in range(M):\n food_list.append(0)\n \nfor i in range(N):\n K=A_list[i][0]\n for j in range(1,K+1):\n #print(A_list[i][j],end="")\n food_list[A_list[i][j]-1]+=1\n\nans=0\n \nfor i in range(M):\n if food_list[i]==N:\n ans+=1\n \nprint(ans)', '\nA,B = map(int, input().split())\n\nif B%A==0:\n print(A+B)\nelse:\n print(B-A)'] | ['Runtime Error', 'Accepted'] | ['s713032175', 's001918781'] | [3064.0, 2940.0] | [17.0, 17.0] | [418, 117] |
p03125 | u316603606 | 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 = mao (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'] | ['s356715914', 's179464952'] | [8980.0, 9100.0] | [25.0, 24.0] | [81, 81] |
p03125 | u325704929 | 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(a + b)\nelse:\n print(b- a)', 't, x = map(int,input().split())\n\nprint(t / x)', 'a, b = map(int, input().split())\n\nif b % a == 0:\n print(b + a)\nelse:\n\tprint(b - a)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s060640968', 's200109442', 's715021351'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0] | [83, 45, 85] |
p03125 | u327532412 | 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'] | ['s764800096', 's120004137'] | [2940.0, 2940.0] | [17.0, 17.0] | [83, 83] |
p03125 | u331157266 | 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()\nb = int()\n\n1 <= a <= b <=20\n\na,b=(int(x) for x in input().split())\n\n\nif a % b == 0:\n print(a + b)\nelse :\n print(a - b)\n', '1 <= a <= b <=20\n\na,b=(int(x) for x in input().split())\n\n\nif b % a == 0:\n print(a + b)\nelse :\n print(a - b)\n', 'a = int()\nb = int()\n\n1 <= a <= b <=20\n\na,b=(int(x) for x in input().split())\n\n\nif b % a == 0:\n print(a + b)\nelse :\n print(b - a)\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s306611125', 's884065922', 's213202491'] | [2940.0, 3060.0, 2940.0] | [17.0, 18.0, 18.0] | [135, 114, 135] |
p03125 | u336721073 | 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("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)\n \n '] | ['Wrong Answer', 'Accepted'] | ['s916497989', 's357965379'] | [2940.0, 2940.0] | [17.0, 17.0] | [89, 111] |
p03125 | u338225045 | 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() ) )\n\n\n\ndp = [0]*(N+1) \ncost = [ 0, 2, 5, 5, 4, 5, 6, 3, 7, 6 ] \n\nfor num_match in range( 2, N+1 ):\n for Aj in A:\n if num_match >= cost[Aj]:\n dp[num_match] = max( dp[num_match], dp[num_match-cost[Aj]]+1 )\n\n\n\nans = ""\ndigit = dp[N]\n\nA.sort( reverse=True )\nwhile N > 0:\n for Ai in A:\n if N-cost[Ai] >=0 and dp[N-cost[Ai]] == digit-1:\n ans += str(Ai)\n N -= cost[Ai]\n digit -= 1\n break\n\nprint( ans )', 'A, B = map( int, input().split() )\n\nif B % A == 0: print( A+B )\nelse: print( B-A )'] | ['Runtime Error', 'Accepted'] | ['s224200714', 's475544943'] | [3192.0, 2940.0] | [20.0, 17.0] | [813, 82] |
p03125 | u342042786 | 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(A-B)', '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(A-B)\nA, 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', 'Runtime Error', 'Accepted'] | ['s336305613', 's807468213', 's884033026', 's555952611'] | [2940.0, 2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [80, 81, 162, 81] |
p03125 | u343977188 | 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(A-B', 'A,B=map(int,input().split())\nif B%A==0:\n print(A+B)\nelse:\n print(B-A)'] | ['Runtime Error', 'Accepted'] | ['s003472719', 's378029964'] | [2940.0, 2940.0] | [17.0, 18.0] | [70, 71] |
p03125 | u345483150 | 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())\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'] | ['s146800987', 's947799402'] | [2940.0, 2940.0] | [17.0, 17.0] | [60, 73] |
p03125 | u350697094 | 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\nN, M=map(int, input().split())\na = []\nfor i in range(N):\n b = []\n b = list(map(int, input().split()))\n del b[0]\n a.extend(b)\n \nc=Counter(a)\n \nfreq_scores = c.most_common()\n \nmax_count = freq_scores[0][1]\n\nmodes = []\n \u3000\nfor num in freq_scores:\n\tif num[1] == max_count:\n \tmodes.append(num[0])\n\nprint(len(a[modes]))\n', '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)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s245584167', 's542348808', 's914831094'] | [2940.0, 3060.0, 2940.0] | [17.0, 19.0, 17.0] | [583, 79, 79] |
p03125 | u351399674 | 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%B ==0:\n print(int(A+B))\nelse:\n print(int(B-A) ) ', 'A,B = map(int,input().split())\nif B == A%B ==0:\n print(A+B)\nelse:\n print(B-A) ', 'A,B = map(int,input().split())\nif B == 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', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s099706995', 's292882684', 's605915737', 's501887604'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [97, 87, 87, 82] |
p03125 | u353241315 | 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. | ["if __name__ == '__main__':\n A, B = map(int, input().split())\n if B%A != 0:\n print(A+B)\n else:\n print(B - A)", "if __name__ == '__main__':\n A, B = map(int, input().split())\n if A%B == 0:\n print(A+B)\n else:\n print(B - A)", "if __name__ == '__main__':\n A, B = map(int, input().split())\n if B%A == 0:\n print(A+B)\n else:\n print(B - A)"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s058440437', 's123416444', 's498279275'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [130, 130, 130] |
p03125 | u357218223 | 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\nimport sys\nN,M = map(int,stdin.readline().rstrip().split())\nif N == 0:\n print(1)\n sys.exit()\nlist = [ set(stdin.readline().rstrip().split()[1:]) for _ in range(0,N)]\nprint(list)\nfav = list[0]\nfor i in range(1,N):\n fav = fav.intersection(list[i])\nprint(len(fav))', '# coding: utf-8\nfrom sys import stdin\nA,B = map(int,stdin.readline().rstrip().split())\nprint( A + B if B % A == 0 else B - A) '] | ['Wrong Answer', 'Accepted'] | ['s328089821', 's734672768'] | [3064.0, 3064.0] | [17.0, 24.0] | [292, 126] |
p03125 | u357751375 | 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(a - b)', 'a,b = map(int,input().split())\nif b % a == 0:\n print(a + b)\nelse:\n print(b - a)'] | ['Wrong Answer', 'Accepted'] | ['s748486739', 's169207122'] | [2940.0, 2940.0] | [17.0, 17.0] | [85, 85] |
p03125 | u362560965 | 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'] | ['s408386066', 's764398778'] | [2940.0, 2940.0] | [17.0, 17.0] | [83, 83] |
p03125 | u363992934 | 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 == b / a:\n print(a+b)\nelse:\n print(a-b)', 'a, b = map(int, input().split())\nif b // a == b / a:\n print(a+b)\nelse:\n print(b-a)'] | ['Runtime Error', 'Accepted'] | ['s370620596', 's123834779'] | [2940.0, 2940.0] | [17.0, 17.0] | [83, 84] |
p03125 | u368780724 | 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 inpl(): return list(map(int, input().split()))\n\nMLE = [[0]*10000 for _ in [0]*10000]\n\nA, B = inpl()\nprint([A+B, B-A][B%A > 0])\n ', 'def inpl(): return list(map(int, input().split()))\n\nA, B = inpl()\nprint([A+B, B-A][B%A > 0])\n '] | ['Time Limit Exceeded', 'Accepted'] | ['s727012956', 's356114354'] | [787828.0, 3064.0] | [2153.0, 17.0] | [135, 97] |
p03125 | u374802266 | 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=list(map(int,input().sprit()))\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'] | ['s802214195', 's739607949'] | [2940.0, 2940.0] | [19.0, 17.0] | [97, 97] |
p03125 | u375542418 | 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 B%A == 0:\n print(A + B)\nelse:\n print(A - B)', 'A, B = (int(i) for i in input().split()) \nif A%B == 0:\n print(A + B)\nelse:\n print(B - A)', 'A, B = (int(i) for i in input().split()) \nif B%A == 0:\n print(A + B)\nelse:\n print(B - A)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s678187262', 's981150315', 's921965918'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [70, 91, 91] |
p03125 | u380524497 | 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 b % a == 0:\n print(a+b)\nelse:\n print(b-a)'] | ['Wrong Answer', 'Accepted'] | ['s587984437', 's112751164'] | [2940.0, 2940.0] | [17.0, 17.0] | [84, 84] |
p03125 | u384679440 | 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(A - B)', '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', 'Runtime Error', 'Accepted'] | ['s793980780', 's836648502', 's951449950'] | [2940.0, 2940.0, 2940.0] | [19.0, 17.0, 17.0] | [84, 84, 83] |
p03125 | u385167811 | 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]\nlist = [min(A)]\nA = sorted(A)\niii = 0\nwhile True:\n iii += 1\n if A[N-1] % A[N-2] != 0:\n A[N-1] = A[N-1] % A[N-2]\n elif N >= 3 and A[N-1] % A[N-3] != 0:\n A[N-1] = A[N-1] % A[N-3]\n\n A = sorted(A)\n list.append(min(A))\n if iii > 32:\n break \n#print(list)\nfor i in range(N-1):\n if A[i+1]-A[i] > 0:\n list.append(A[i+1]-A[i])\n#print(list)\nprint(min(list))', 'A,B = map(int,input().split(" "))\nif B % A == 0:\n print(A+B)\nelse:\n print(B-A)'] | ['Runtime Error', 'Accepted'] | ['s332642656', 's082928788'] | [3064.0, 2940.0] | [18.0, 17.0] | [465, 84] |
p03125 | u388547496 | 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 numpy as np\nN, M = map(int, input().split())\na = np.zeros((N,M))\nfor i in range(N):\n K = list(map(int, input().split())) \n for j in K[1:]:\n a[i][j-1] = 1\nb = a.sum(axis=0)\nprint(len(np.where(b==N)[0]))', '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)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s159458879', 's483542324', 's675649971'] | [12388.0, 2940.0, 2940.0] | [149.0, 17.0, 17.0] | [221, 82, 82] |
p03125 | u396971285 | 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(A+B)\nelse\n print(A-B)', 'A, B=map(int, input().split())\n\nif B%A==0:\n print(A+B)\nelse:\n print(B-A)'] | ['Runtime Error', 'Accepted'] | ['s706256257', 's156029556'] | [2940.0, 2940.0] | [17.0, 18.0] | [75, 76] |
p03125 | u398983698 | 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().sulit())\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)'] | ['Runtime Error', 'Accepted'] | ['s879421488', 's754918043'] | [2940.0, 2940.0] | [17.0, 17.0] | [75, 72] |
p03125 | u399721252 | 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(v) for v in input().split() ]\n\nif a % b == 0:\n print(a+b)\nelse:\n print(a-b)', 'a, b = [ int(v) for v in input().split() ]\n\nif a % b == 0:\n print(a+b)\nelse:\n print(b-a)', 'a, b = [ int(v) for v in input().split() ]\n\nif b % a == 0:\n print(a+b)\nelse:\n print(b-a)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s201750588', 's374251262', 's624613587'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [90, 90, 90] |
p03125 | u403551852 | 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())\nprint(a+b if b%a == 0 else a-b)', 'a = int(input())\nb = int(input())\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', 'Runtime Error', 'Accepted'] | ['s373354761', 's399073868', 's360214881'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [65, 65, 62] |
p03125 | u407535999 | 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. | ['ab=input().split()\na=int(ab[0])\nb=int(ab[1])\nif isinstance(b/a,int):\n print(str(a+b))\nelse:\n print(str(b-a))', 'ab=input().split()\na=int(ab[0])\nb=int(ab[1])\nif isinstance(b/a,int):\n print(str(a+b))\nelse:\n print(str(a-b))', 'ab=input().split()\na=int(ab[0])\nb=int(ab[1])\nif (b/a).is_integer():\n print(str(a+b))\nelse:\n print(str(b-a))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s441542191', 's462091996', 's999918679'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [110, 110, 110] |
p03125 | u416758623 | 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)\n', 'A,B=(int(x) for x in input().split())\nif(B % A == 0):\n print(A + B)\nelse:\n print(B - A)'] | ['Runtime Error', 'Accepted'] | ['s235565984', 's912699678'] | [2940.0, 2940.0] | [17.0, 17.0] | [79, 89] |
p03125 | u417027396 | 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. | ['inputString = input(\'Enter a string:\')\n#inputString = "4 12"\nnums = []\nfor num in inputString.split(" "):\n nums.append(int(num))\n\nif(nums[1]%nums[0]==0):\n print(nums[0]+nums[1])\nelse:\n print(nums[1]-nums[0])', 'inputString = input(\'Enter a string:\')\n#inputString = "4 12"\nnums = []\nfor num in inputString.split(" "):\n nums.append(int(num))\n\nif(nums[1]%nums[0]==0):\n print(nums[0]+nums[1])\nelse:\n print(nums[1]-nums[0])', 'def gcd(a,b):\n r = a%b\n #print(a,b,r)\n if(r==0): return b\n return gcd(b,r)\nn = int(input()) \n#n=4\nhps = [int(i) for i in input().split()]\n#lst = [2, 2, 8, 40]\n#lst = [5, 13, 8, 1000000000]\n#lst = [0, 1, 0]\n ##2 4 5 -> 1\n \nhps = sorted(hps)\nfor i in range(1,n):\n hps[0] = gcd(hps[i], hps[0])\nprint(hps)\nfor i in range(len(hps)):\n if(hps[i]==0): continue\n print(hps[i])\n break', 'import numpy as np\nn = int(input()) \n#n=4\nlst = [int(i) for i in input().split()]\n#lst = [2, 2, 8, 40]\n#lst = [5, 13, 8, 1000000000]\n#lst = [0, 1, 0]\nhps = np.array(lst)\nwhile(1):\n hps = sorted(hps)\n #print(hps)\n if(hps[0]==0): break\n if(hps[0]==hps[len(hps)-1]): break\n hps[1] = hps[1] - hps[0]\nprint(hps[1])', 'a, b= (int(i) for i in input().split()) \n\nif(b%a==0):\n print(a+b)\nelse:\n print(b-a)'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s231281894', 's554004514', 's705857208', 's793340204', 's257421150'] | [2940.0, 2940.0, 3064.0, 12388.0, 2940.0] | [17.0, 17.0, 17.0, 149.0, 17.0] | [216, 216, 434, 324, 90] |
p03125 | u418267120 | 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\nc = sys.stdin.readline()\nd = c.split()\nA = int(d[0])\nB = int(d[1])\nif B % A == 0:\n print(str(B - A))\nelse:\n print(str(A - B))', 'import sys\n\nc = sys.stdin.readline().split()\nA = int(c[0])\nB = int(c[1])\nif B % A == 0:\n print(str(B + A))\nelse:\n print(str(B - A))'] | ['Wrong Answer', 'Accepted'] | ['s124678230', 's893349562'] | [2940.0, 2940.0] | [17.0, 17.0] | [143, 137] |
p03125 | u419963262 | 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())\nif B%A==0:\n ptint(A+B)\nelse:\n print(B-A)', 'A,B=map(int,input().split())\n\nif B%A==0:\n ptint(A+B)\nelse:\n print(B-A)\n', 'A,B=map(int,input().split())\n\nif B%A==0:\n print(A+B)\nelse:\n print(B-A)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s280796748', 's411365069', 's328265509'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [59, 73, 73] |
p03125 | u423614187 | 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):\n print(a+b)\n\nelse:\n print(b-a)', 'a,b = map(int,input().split(" "))\n\nif(b%a==0):\n print(a+b)\n\nelse:\n print(b-a)'] | ['Wrong Answer', 'Accepted'] | ['s600497919', 's714800837'] | [2940.0, 2940.0] | [17.0, 17.0] | [76, 79] |
p03125 | u430414424 | 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(A+B)\nelse:\n \tprint(A=B)', 'A,B = map(int,input().split())\n\nif B%A == 0\n\tprint(A+B)\nelse:\n \tprint(A-B)', 'A,B = map(int,input().split())\n\nif B%A == 0:\n\tprint(A+B)\nelse:\n \tprint(B-A)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s213493157', 's259719789', 's519827276'] | [3060.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [75, 75, 76] |
p03125 | u432805419 | 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)'] | ['Runtime Error', 'Accepted'] | ['s806370808', 's745338628'] | [2940.0, 2940.0] | [18.0, 18.0] | [76, 77] |
p03125 | u434872492 | 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 solve(m_list):\n m_val = m_list[0]\n for i in m_list:\n m_val = min(m_val,gcd(min_val,m))\n return min_val\n\ndef gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\ndef main():\n n = int(input())\n m_list = list(map(int,input().split()))\n\n ans = solve(m_list)\n print(ans)', "def solve(m_list):\n m_val = m_list[0]\n for i in m_list:\n m_val = min(m_val,gcd(min_val,m))\n return min_val\n\ndef gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\ndef main():\n n = int(input())\n m_list = list(map(int,input().split()))\n\n ans = solve(m_list)\n print(ans)\n\nif __name__ == '__main__':\n main()", 'def solve(m_list):\n m_val = m_list[0]\n for i in m_list:\n m_val = min(m_val,gcd(min_val,m))\n return min_val\n\ndef gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\ndef main():\n n = int(input())\n m_list = list(map(int,input().split()))\n\n ans = solve(m_list)\n print(ans)\nmain()', 'def solve(m_list):\n m_val = m_list[0]\n for i in m_list:\n m_val = min(m_val,gcd(min_val,m))\n return m_val\n\ndef gcd(a,b):\n while b:\n a,b = b,a%b\n return a\n\ndef main():\n n = int(input())\n m_list = list(map(int,input().split()))\n\n ans = solve(m_list)\n print(ans)\n\nmain()', 'A, B = map(int,input().split())\n\nif B % A == 0:\n print(A+B)\nelse:\n print(B-A)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s677346822', 's771831207', 's931252826', 's980991643', 's861143726'] | [2940.0, 3060.0, 3056.0, 3056.0, 2940.0] | [17.0, 18.0, 17.0, 17.0, 17.0] | [301, 340, 308, 307, 83] |
p03125 | u437215432 | 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. | ['\u3000# ABC118A\n\na, b = map(int, input().split())\nif b % a == 0:\n print(a+b)\nelse:\n print(b-a)\n', '# ABC118A\n\na, b = map(int, input().split())\nif b % a == 0:\n print(a+b)\nelse:\n print(b-a)\n'] | ['Runtime Error', 'Accepted'] | ['s018457504', 's032984980'] | [3064.0, 2940.0] | [19.0, 17.0] | [98, 95] |
p03125 | u437638594 | 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(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'] | ['s844840407', 's124114426'] | [2940.0, 2940.0] | [17.0, 17.0] | [78, 80] |
p03125 | u450904670 | 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()))\nprint(b // a if b % a == 0 else b - a)', 'a,b = list(map(int, input().split()))\nprint(b + a if b % a == 0 else b - a)\n'] | ['Wrong Answer', 'Accepted'] | ['s290938509', 's539644309'] | [2940.0, 2940.0] | [17.0, 17.0] | [76, 76] |
p03125 | u452844010 | 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. | ['str = input().strip()\n\na = int(str[1])\nb = int(str[2])\n\nif (b % a) == 0:\n\tprint(a + b)\nelse:\n\tprint(b-a)', 'str = input().strip()\n\na = int(str[1])\nb = int(str[2])\n\nif (b % a) == 0:\n\tprint(a + b)\nelse:\n\tprint(b-a)', 'str = input().split()\na = int(str[0])\nb = int(str[1])\n\nif (b % a) == 0:\n\tprint(a + b)\nelse:\n\tprint(b-a)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s394725512', 's739541524', 's600383811'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [104, 104, 103] |
p03125 | u455317716 | 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(x) for x in input().split()\nif (!b%a):\n print(a+b)\nelse:\n print(b-a)', 'a, b = (int(x) for x in input().split())\nif (b % a):\n print(b-a)\nelse:\n print(b+a)'] | ['Runtime Error', 'Accepted'] | ['s981833766', 's280960363'] | [2940.0, 2940.0] | [17.0, 17.0] | [84, 88] |
p03125 | u455642216 | 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'] | ['s774542682', 's865840225'] | [2940.0, 2940.0] | [17.0, 18.0] | [75, 75] |
p03125 | u456595418 | 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 solve():\n ans1, ans2 = map(int, input('数字を入れる\\n').split(' '))\n if ans2 % ans1 == 0:\n print(ans1 + ans2)\n else:\n print(ans2 - ans1)\n\nsolve()", 'def solve():\n ans1, ans2 = map(int, input().split())\n if ans2 % ans1 == 0:\n print(ans1 + ans2)\n else:\n print(ans2 - ans1)\n\nsolve()'] | ['Wrong Answer', 'Accepted'] | ['s306484221', 's676109292'] | [2940.0, 2940.0] | [17.0, 17.0] | [178, 153] |
p03125 | u457460736 | 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(A-B)', 'A,B=map(int,input().split())\nif(B%A==0):\n print(A+B)\nelse:\n print(B-A)\n'] | ['Wrong Answer', 'Accepted'] | ['s338580681', 's672201980'] | [9044.0, 9044.0] | [30.0, 29.0] | [73, 73] |
p03125 | u463655976 | 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())\nprint(A+B if B%A==0 else B-A)', 'A, B = map(int, input().split())\nif A % B == 0:\n print(A+B)\nelse:\n print(A-B)\n', 'A, B = map(int, input().split())\nif B % A == 0:\n print(A+B)\nelse:\n print(B-A)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s407631990', 's743725538', 's925585423'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [52, 80, 80] |
p03125 | u464397170 | 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())\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'] | ['s853574405', 's116597417'] | [2940.0, 2940.0] | [17.0, 17.0] | [62, 70] |
p03125 | u465699806 | 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. | ["\nn, m = map(int, input().split(' '))\nai = list(sorted(map(int, input().split(' '))))\nrequired_maches = {1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 3, 8: 7, 9: 6}\n\nused_numbers = dict()\n\ndef evaluate(l):\n if l == None:\n return -9999999999999999999999999999999\n if l == []:\n return 0\n return int(''.join(reversed([str(i) for i in sorted(l)])))\n\nmin_maches = min([required_maches[x] for x in ai])\ndef find(matches_count_to_use):\n if matches_count_to_use not in used_numbers:\n if matches_count_to_use < 0:\n used_numbers[matches_count_to_use] = None\n elif matches_count_to_use == 0:\n used_numbers[matches_count_to_use] = []\n else:\n candidates = list(filter(\n lambda x: find(matches_count_to_use - required_maches[x]) != None, ai))\n if len(candidates) == 0:\n used_numbers[matches_count_to_use] = None\n else:\n number_to_use = max(candidates,\n key=lambda x: evaluate(find(matches_count_to_use - required_maches[x]) + [x]))\n prev = find(matches_count_to_use - required_maches[number_to_use])\n used_numbers[matches_count_to_use] = prev + [number_to_use]\n \n return used_numbers[matches_count_to_use]\n \nprint(evaluate(find(n)))", "a, b = map(int, input().split(' '))\nif b%a == 0 :\n print(a+b)\nelse:\n print(b-a)"] | ['Runtime Error', 'Accepted'] | ['s648621306', 's618043732'] | [3064.0, 2940.0] | [18.0, 17.0] | [1328, 85] |
p03125 | u466143662 | 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(A + B)\nelse:\n print(B - A)\n ', 'A, B = map(int, input().split())\n1 <= A <= B <= 20\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)\n ', 'A, B = (int(i) for i in input().split())\n\n \nif B%A==0:\n ptint(A+B)\nelse:\n print(A-B)', 'A, B = (int(i) for i in input().split())\n1 <= B <= A <= 20\n \nif B % A == 0:\n print(A+B)\nelse:\n print(A-B)', 'A, B = map(int, input().split())\n1 <= B <= A <= 20\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 A % B == 0:\n print(A+B)\nelse:\n print(A-B)\n ', 'A, B = (int(i) for i in input().split())\n1 <= B <= A <= 20\n\nif B%A==0:\n ptint(A+B)\nelse:\n print(A-B)\n ', 'A, B = map(int, input().split())\n1 <= B <= A <= 20\n \nif A % B == 0:\n print(A+B)\nelse:\n print(A-B)', 'A, B = (int(i) for i in input().split())\n1 <= B <= A <= 20\n \nif A % B == 0:\n print(A+B)\nelse:\n print(A-B)', 'A, B = map(int, input().split())\n \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', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s095557751', 's106159197', 's219062503', 's263332338', 's270589401', 's451152327', 's472704112', 's578660052', 's625973866', 's785768930', 's886553306', 's955987865', 's404945313'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 16.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 17.0] | [96, 108, 92, 92, 113, 106, 92, 92, 111, 105, 113, 91, 71] |
p03125 | u472492255 | 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(x) for x in input().split(" ")]\nif a % b == 0:\n print(a+b)\nelse:\n print(b-a)', 'a, b = [int(x) for x in input().split(" ")]\nif b % a == 0:\n print(a+b)\nelse:\n print(b-a)'] | ['Wrong Answer', 'Accepted'] | ['s418737158', 's912703403'] | [2940.0, 2940.0] | [17.0, 17.0] | [90, 90] |
p03125 | u474925961 | 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\nif sys.platform =='ios':\n sys.stdin=open('input_file.txt')\n\nn,k=map(int,input().split())\n\nif (n%k)==0:\n\tprint(0)\nelse:\n\tprint(1)", "import sys\n\nif sys.platform =='ios':\n sys.stdin=open('input_file.txt')\n\na,b=map(int,input().split())\n\nif b%a==0:\n\tprint(a+b)\nelse:\n\tprint(b-a)"] | ['Wrong Answer', 'Accepted'] | ['s360152946', 's615930208'] | [2940.0, 2940.0] | [17.0, 17.0] | [143, 145] |
p03125 | u475442247 | 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 numpy as np\n\n\nnmatch = np.array([0,2,5,5,4,5,6,3,7,6])\nN,M = map(int,input().split())\ndp = [-1]*(N+1) # contains the number of digits it can make\ndp[0] = 0\nff = np.array(list(map(int,input().split()))).reshape(-1,1)\nfg = nmatch[ff].reshape(-1,1)\nAtemp = np.concatenate([ff,fg],axis=1)\nindex0 = np.argsort(Atemp[:,0])\nindex1 = np.argsort(Atemp[:,1])\nA = Atemp[index1] #sorted by the number of matches: ascending\nB = Atemp[index0]\nB = B[::-1] #sorted by the number: descending\nfor i in range(1,N+1):\n for k in range(M):\n j = A[k,1]\n i_old = i - j \n if (i-j) < 0:\n break\n if (i-j) == 0 and dp[i] == -1:\n dp[i] = 1\n if dp[i_old] != -1 and dp[i_old]+1 > dp[i]:\n dp[i] = dp[i_old] + 1\n#print(dp)\nndigits = dp[N]\nj = N\nfinal_number = ''\nfor l in range(ndigits,0,-1):\n index = 0\n while True:\n temp_j = j - B[index,1]\n if temp_j < 0:\n index += 1\n continue\n if dp[temp_j] + 1 == dp[j]:\n final_number += str(B[index,0])\n j = temp_j\n break\n else:\n index += 1\n if index > M:\n break\nprint(int(final_number))\n", 'a = input()\nb = a.split()\nA = int(b[0])\nB = int(b[1])\nif B%A == 0:\n print(A+B)\nelse:\n print(B-A)\n'] | ['Runtime Error', 'Accepted'] | ['s662185850', 's302985651'] | [22288.0, 2940.0] | [1165.0, 18.0] | [1223, 103] |
p03125 | u475675023 | 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(iunt,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)\n'] | ['Runtime Error', 'Accepted'] | ['s832083429', 's128054382'] | [2940.0, 2940.0] | [17.0, 17.0] | [59, 59] |
p03125 | u478588435 | 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());print(a+b if b%a else a-b)', 'a,b=map(int,input().split());a+b if b%a else a-b', 'a,b=map(int,input().split());print(b-a if b%a else b+a)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s138674009', 's512941983', 's000614848'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [55, 48, 56] |
p03125 | u483722302 | 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 -*-\nA, B = list(map(int, input().split()))\n\nif A % B == 0:\n print(A + B)\nelse:\n print(B - A)\n', '# -*- coding: utf-8 -*-\nA, B = list(map(int, input().split()))\n\nif B % A == 0:\n print(A + B)\nelse:\n print(B - A)\n'] | ['Wrong Answer', 'Accepted'] | ['s748542780', 's144976032'] | [2940.0, 2940.0] | [17.0, 17.0] | [119, 119] |
p03125 | u483737025 | 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()\na=int(l[0])\nb=int(l[1])\nif a%b==0:\n print(a+b)\nelif:\n print(b-a)', 'l=input().split()\na=int(l[0])\nb=int(l[1])\nif b%a==0:\n print(a+b)\nelse:\n print(b-a)'] | ['Runtime Error', 'Accepted'] | ['s797126306', 's143842146'] | [2940.0, 2940.0] | [17.0, 17.0] | [88, 88] |
p03125 | u486448566 | 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(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)\n'] | ['Wrong Answer', 'Accepted'] | ['s525294181', 's099789801'] | [2940.0, 2940.0] | [17.0, 17.0] | [78, 79] |
p03125 | u497310132 | 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(x) for x in input().split())\nif B % A == 0:\n return A + B\nelse:\n return B - A', 'N, M = (int(x) for x in input().split())\nKA = [[int(x) for x in l] for l in [input().split() for i in range(N)]]\n[x.pop(0) for x in KA]\nx = []\nfor s in KA:\n x.extend(s)\nc = 0\nfor i in range(1, M + 1):\n c = c + (1 if x.count(i) == N else 0)\nprint(c)', 'A, B = (int(x) for x in input().split())\nif B % A == 0:\n print(A + B)\nelse:\n print(B - A)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s085662617', 's493982443', 's570251447'] | [2940.0, 3060.0, 2940.0] | [17.0, 17.0, 18.0] | [91, 250, 91] |
p03125 | u497883442 | 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 b%a = 0:\n print(a+b)\nelse:\n print(a-b)', 'n = int(input())\na = list(map(int,input().split()))\na = sorted(a)\ndef gcd(a,b):\n c = a%b\n if c == 0:\n return b\n else:\n return gcd(b,c)\nc = 0\nfor i in a[1:]:\n c_ = gcd(i,a[0])\n if c_ == 1:\n c = 1\n break\n else:\n if c_ < c or c == 0:\n c = c_\nprint(c)\n', 'n,m = list(map(int,input().split()))\nb = [0 for i in range(m)]\nfor i in range(n):\n ka = list(map(int,input().split()))\n k = ka[0]\n a = ka[1:]\n for j in range(k):\n b[a[j]-1] += 1\nc = 0\nfor i in range(m):\n if b[i] == n:\n c += 1\nprint(c)\n', 'a,b = list(map(int,input().split()))\nif b%a == 0:\n print(a+b)\nelse:\n print(b-a)\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s596937117', 's680100049', 's850064227', 's024138660'] | [2940.0, 3064.0, 3060.0, 2940.0] | [18.0, 18.0, 17.0, 18.0] | [80, 274, 246, 82] |
p03125 | u503228842 | 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:\n print(a+b)\nelse:\n print(b-a)', 'a,b = map(int,input().split())\nif b%a==0:\n print(b+a)\nelse:\n print(b-a)'] | ['Wrong Answer', 'Accepted'] | ['s663621414', 's126845913'] | [2940.0, 2940.0] | [17.0, 17.0] | [70, 77] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.