start
stringlengths 5
368
| code
stringlengths 5
143
| end
stringlengths 5
527
|
---|---|---|
n = 1.0000000000000006e-89 | n /= 10 | n = 1.0000000000000006e-90 |
f = 3; l = 1; u = 1; v = 0 | f, v = l, u | f = 1; l = 1; u = 1; v = 1 |
h = 395; k = 87; x = 7 | k = h // x | h = 395; k = 56; x = 7 |
c = [2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0]; i = 0; j = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | j[i] = c[i] / 2 | c = [2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0]; i = 0; j = [1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
g = [0, 1, 1, 1, 0, 0, 0, 0, 0]; i = 6 | g[i] += 1 | g = [0, 1, 1, 1, 0, 0, 1, 0, 0]; i = 6 |
v = 2 | v <<= 1 | v = 4 |
g = 8; i = 1; q = [1, 2, 3, 3] | g -= q[i] | g = 6; i = 1; q = [1, 2, 3, 3] |
i = 2; j = 26 | j += i | i = 2; j = 28 |
n = 3 | q = [0] * n | n = 3; q = [0, 0, 0] |
f = 1; v = [{2}, {3}, {0, 3}, {2}, set(), set()]; x = 3 | v[x].add(f) | f = 1; v = [{2}, {3}, {0, 3}, {1, 2}, set(), set()]; x = 3 |
f = [0, 0, 0, 0, 0]; i = 1; v = [1, 2, 3, 3] | f[i] = f[i - 1] + v[i - 1] | f = [0, 1, 0, 0, 0]; i = 1; v = [1, 2, 3, 3] |
l = deque(['1', '2', '3', '4', '5\n']); q = 4 | l.rotate(-q) | l = deque(['5\n', '1', '2', '3', '4']); q = 4 |
e = [0, 1, 3, 0, 4, 1, 7, 0, 8, 1, 11, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; i = 14 | e[i] = e[i - 1] ^ i | e = [0, 1, 3, 0, 4, 1, 7, 0, 8, 1, 11, 0, 12, 1, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; i = 14 |
f = [(1, 0), (0, 1), (2, 1), (1, 2), (0, 2), (2, 0)]; n = 2, 2 | f.append(n) | f = [(1, 0), (0, 1), (2, 1), (1, 2), (0, 2), (2, 0), (2, 2)]; n = (2, 2) |
a = 'ABACABA['; b = 'ABACABA['; g = 'AABABACA'; i = 3; j = 5 | g += min(a[i], b[j]) | a = 'ABACABA['; b = 'ABACABA['; g = 'AABABACAB'; i = 3; j = 5 |
i = 2; s = '99910001001'; x = 9 | x = int(s[:i]) | i = 2; s = '99910001001'; x = 99 |
k = False | k = total | c = -11; k = -11 |
g = [4, 16, 36, 64, 100, 144, 196, 256, 324, 400, 1296, 1444, 1600, 1764, 1936, 2116, 2304, 2500, 2704]; i = 54 | g.append(i * i) | g = [4, 16, 36, 64, 100, 144, 196, 256, 324, 400, 1296, 1444, 1600, 1764, 1936, 2116, 2304, 2500, 2704, 2916]; i = 54 |
l = 0 | r = l | l = 0; r = 0 |
c = 4; i = 5 | c = i | c = 5; i = 5 |
g = {'A': 2, 'B': 2, 'C': 1}; r = '_' | g.update({r: g.get(r, 0) + 1}) | g = {'A': 2, 'B': 2, 'C': 1, '_': 1}; r = '_' |
i = 2; j = 6; l = 6 | j += l - i | i = 2; j = 10; l = 6 |
x = ['HACK', '2'] | s = x[0] | s = 'HACK'; x = ['HACK', '2'] |
x = '1' | x = int(x) | x = 1 |
i = 1; r = 'bebeeeb' | a = r[i] | a = 'e'; i = 1; r = 'bebeeeb' |
d = deque([]); s = ['append', '1'] | d.append(s[1]) | d = deque(['1']); s = ['append', '1'] |
n = 5; y = [1, 3] | n = int(y.pop()) | n = 3; y = [1] |
a = [set(), {2}, set()]; g = [2, 3] | a[g[1] - 1].add(g[0] - 1) | a = [set(), {2}, {1}]; g = [2, 3] |
m = '5' | m = int(m) | m = 5 |
d = [1, 1, 2]; l = 2 | l = d.pop() | d = [1, 1]; l = 2 |
i = 78; s = [4, 16, 36, 64, 100, 144, 196, 256, 324, 400, 3600, 3844, 4096, 4356, 4624, 4900, 5184, 5476, 5776] | s.append(i * i) | i = 78; s = [4, 16, 36, 64, 100, 144, 196, 256, 324, 400, 3600, 3844, 4096, 4356, 4624, 4900, 5184, 5476, 5776, 6084] |
q = 0; s = 3; z = 1 | b = s - q - z | b = 2; q = 0; s = 3; z = 1 |
i = 3; k = [1, 4, 5, 3, 2]; t = {(1): 0, (4): 1, (5): 2} | t[k[i]] = i | i = 3; k = [1, 4, 5, 3, 2]; t = {1: 0, 4: 1, 5: 2, 3: 3} |
j = 4; v = '2 ' | v += str(j) + ' ' | j = 4; v = '2 4 ' |
i = 3; x = {(0): [], (1): [], (2): []} | x[i] = [] | i = 3; x = {0: [], 1: [], 2: [], 3: []} |
a = 3; e = [6.0, 10.0] | a += len(e) | a = 5; e = [6.0, 10.0] |
m = ['HACK', '2'] | m[0] = list(m[0]) | m = [['H', 'A', 'C', 'K'], '2'] |
d = 8; i = 7 | i = d | d = 8; i = 8 |
j = 4; n = 12 | j = sum([int(t) for t in str(n)]) | j = 3; n = 12 |
c = 318058593321623319 | c %= 1000000007 | c = 95213182 |
j = 29 | j += 1 | j = 30 |
j = 7 | j = j + 1 | j = 8 |
a = 1; g = 2 | a = g | a = 2; g = 2 |
i = 3; s = 'ifai'; t = [1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | t[ord(s[i]) - ord('a')] += 1 | i = 3; s = 'ifai'; t = [1, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
q = ['n']; u = 'cdb' | q = list(u) | q = ['c', 'd', 'b']; u = 'cdb' |
a = 6; d = {(0): 2, (6): 1} | d[a] = d[a] + 1 | a = 6; d = {0: 2, 6: 2} |
m = ['{']; x = '{' | m.append(x) | m = ['{', '{']; x = '{' |
q = 1; r = '_', 2 | q = r[1] | q = 2; r = ('_', 2) |
d = 5 | d += 1 | d = 6 |
c = '_'; t = 1; u = {'_': 0, 'R': 1, 'B': 1, 'Y': 1} | u[c] = t | c = '_'; t = 1; u = {'_': 1, 'R': 1, 'B': 1, 'Y': 1} |
i = 1; k = 3; n = '999100010001' | k = len(str(int(n[:i]) + 1)) | i = 1; k = 2; n = '999100010001' |
d = deque(['1', '2', '3']); q = ['4']; s = 'appendleft' | getattr(d, s)(*q) | d = deque(['4', '1', '2', '3']); q = ['4']; s = 'appendleft' |
p = 2 | p += 1 | p = 3 |
l = 1; m = 1; o = 2; q = {} | q[m, l] = o | l = 1; m = 1; o = 2; q = {(1, 1): 2} |
d = 0 | n = [d] | d = 0; n = [0] |
j = 5 | j -= 1 | j = 4 |
l = [1, 1] | l.append(0) | l = [1, 1, 0] |
n = 1; z = [1, 0, 1] | z = [n + 1] | n = 1; z = [2] |
i = 1; j = 3 | j = j - i - k | i = 1; j = -60; k = 62 |
k = 1.0000000000000004e-56 | k = k / 10 | k = 1.0000000000000004e-57 |
i = 0; k = 'bbxx'; p = {'y': 1, 'x': 1} | p[k[i]] = p.get(k[i], 0) + 1 | i = 0; k = 'bbxx'; p = {'y': 1, 'x': 1, 'b': 1} |
i = 0 | c = i | c = 0; i = 0 |
i = 2; j = 3; k = 5 | i, j, k = 0, 0, 0 | i = 0; j = 0; k = 0 |
a = 5 | a = str(a % 100) | a = '5' |
c = 1; r = 2; u = -1; v = -1 | r, c = r + v, c + u | c = 0; r = 1; u = -1; v = -1 |
b = ['43', '63', '75']; w = 101737 | w += int(b[1]) ** 2 | b = ['43', '63', '75']; w = 105706 |
j = 3; k = 3; v = [1, 2, 3, 1, 2] | k = v[j] | j = 3; k = 1; v = [1, 2, 3, 1, 2] |
m = 3; v = {(1): 0, (2): 24, (3): -1, (4): 20}; x = 3, 3 | v[x[0]] = m | m = 3; v = {1: 0, 2: 24, 3: 3, 4: 20}; x = (3, 3) |
d = [['a', 'b', 'c', 'd', 'e'], ['f', 'g', 'h', 'i', 'j'], ['o', 'l', 'm', 'k', 'n'], ['t', 'r', 'p', 'q', 's'], ['x', 'y', 'w', 'u', 'v']]; o = 2 | d[o] = sorted(d[o]) | d = [['a', 'b', 'c', 'd', 'e'], ['f', 'g', 'h', 'i', 'j'], ['k', 'l', 'm', 'n', 'o'], ['t', 'r', 'p', 'q', 's'], ['x', 'y', 'w', 'u', 'v']]; o = 2 |
e = [False, False, True, True, False, True, True, True, True, True, True, True, True, True, True, True]; i = 2; o = 3 | e[i * o] = False | e = [False, False, True, True, False, True, False, True, True, True, True, True, True, True, True, True]; i = 2; o = 3 |
d = 2; f = [0, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0]; l = 4 | f[l] = d + 1 | d = 2; f = [0, 1, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0]; l = 4 |
i = 3; j = 0; p = [[0, 0, 0], [0, 1, 0], [0, 2, 0], [0, 3, 0], [0, 4, 0], [2, 3, 0], [2, 4, 0], [2, 4, 1], [2, 5, 0]]; v = 0 | p.append([i, j, v]) | i = 3; j = 0; p = [[0, 0, 0], [0, 1, 0], [0, 2, 0], [0, 3, 0], [0, 4, 0], [2, 3, 0], [2, 4, 0], [2, 4, 1], [2, 5, 0], [3, 0, 0]]; v = 0 |
x = [1, 12, 5, 111, 200, 1000, 10] | x.sort() | x = [1, 5, 10, 12, 111, 200, 1000] |
a = '2'; h = '3' | a = h | a = '3'; h = '3' |
c = 3; r = 4; u = 0; v = -1 | r, c = r + v, c + u | c = 3; r = 3; u = 0; v = -1 |
c = -2; m = 2; r = 1; t = 1 | r, c = m + r, t + c | c = -1; m = 2; r = 3; t = 1 |
v = 155; y = 174 | v = y | v = 174; y = 174 |
c = [1]; u = 0 | c.append(u) | c = [1, 0]; u = 0 |
j = '0'; m = '11111111' | m += '1' if j == '0' else '0' | j = '0'; m = '111111111' |
z = '100' | z = str(int(z) + 1) | z = '101' |
i = 1; q = deque([2]) | i = q.popleft() | i = 2; q = deque([]) |
c = [1, 2]; i = 3 | c.append(i) | c = [1, 2, 3]; i = 3 |
c = [1]; j = 0; n = 1 | n = c[j] + 1 | c = [1]; j = 0; n = 2 |
f = 1001; s = 7 | f = s | f = 7; s = 7 |
b = 'n'; x = 'hACKERrANK.COM PRESENTS "pYTHO' | x += b.upper() | b = 'n'; x = 'hACKERrANK.COM PRESENTS "pYTHON' |
u = 0; x = 3 | u = x | u = 3; x = 3 |
i = '2'; j = {'1': 2, '2': 2, '3': 3, '6': 3, '5': 3, '4': 2} | j[i] += 1 | i = '2'; j = {'1': 2, '2': 3, '3': 3, '6': 3, '5': 3, '4': 2} |
i = 0; j = 0 | l.append((i, j)) | i = 0; j = 0; l = [(0, 0)] |
k = 1.0000000000000003e-10 | k = k / 10 | k = 1.0000000000000003e-11 |
d = {}; x = 1 | d[x] = 1 | d = {1: 1}; x = 1 |
j = 63967; s = [0, 1, 3, 7, 15, 31, 63, 127, 255, 77663, 55327, 10655, 21311, 42623, 85247, 70495, 40991, 81983] | s.append(j) | j = 63967; s = [0, 1, 3, 7, 15, 31, 63, 127, 255, 77663, 55327, 10655, 21311, 42623, 85247, 70495, 40991, 81983, 63967] |
b = [1, 5, 9]; d = ['reverse']; z = [] | getattr(b, d[0])(*z) | b = [9, 5, 1]; d = ['reverse']; z = [] |
b = 1; j = 0; k = [2, 3, 1, 2] | k.insert(j, b) | b = 1; j = 0; k = [1, 2, 3, 1, 2] |
e = 1; i = 3; w = [1, 2, 3, 7, 12, 14, 21, 21] | e = w[i] | e = 7; i = 3; w = [1, 2, 3, 7, 12, 14, 21, 21] |
a = '01b0'; q = 1 | q = a.find('01', q) | a = '01b0'; q = -1 |
e = 'whatwemustbecausewecan'; j = 19; q = 'wemustbecausewe' | q += e[j] | e = 'whatwemustbecausewecan'; j = 19; q = 'wemustbecausewec' |
s = 6; x = 9 | s = x | s = 9; x = 9 |
c = 1; i = 1; x = 2 | c += x % 10 * 2 ** i | c = 5; i = 1; x = 2 |
n = 4; o = '123456\n' | n = int(o.strip()) | n = 123456; o = '123456\n' |
t = 99; y = 98 | y = t | t = 99; y = 99 |