start stringlengths 5 368 | code stringlengths 5 143 | end stringlengths 5 527 |
|---|---|---|
a = [2, 3, 5, 7, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67]; i = 71 | a.append(i) | a = [2, 3, 5, 7, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71]; i = 71 |
d = 4; h = -1 | h = d | d = 4; h = 4 |
c = 0; d = [(0, 1), (1, 2), (2, 2)]; r = 0 | d.append((r, c)) | c = 0; d = [(0, 1), (1, 2), (2, 2), (0, 0)]; r = 0 |
b = 999; f = 1; i = 2; n = [999, 1, 1, 1, 0]; r = [0, 999, 0, 0, 0, 0]; x = [0, 1, 0, 0, 0, 0] | b = sum(n[i - f:i]) + r[i - f - x[i - f]] | b = 1; f = 1; i = 2; n = [999, 1, 1, 1, 0]; r = [0, 999, 0, 0, 0, 0]; x = [0, 1, 0, 0, 0, 0] |
a = '3\n' | i = int(a) | a = '3\n'; i = 3 |
e = [1, 1, 2, 6, 24]; y = 5 | e.append(e[y - 1] * y) | e = [1, 1, 2, 6, 24, 120]; y = 5 |
g = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []] | g.append([]) | g = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []] |
v = 3 | t += v | t = -30; v = 3 |
d = 9; o = '9' | o = str(d + 1) | d = 9; o = '10' |
s = '*.M' | l.append(list(s)) | l = [['*', '.', 'M']]; s = '*.M' |
b = [[3, 4, 8, 12], [1, 6, 7, 16], [5, 10, 11, 15], [9, 13, 13, 14]]; e = 4; l = 0; n = 0 | b[e - 1 - l][n + 1] = b[e - 1 - l][n] | b = [[3, 4, 8, 12], [1, 6, 7, 16], [5, 10, 11, 15], [9, 9, 13, 14]]; e = 4; l = 0; n = 0 |
i = 1; k = 3; m = [9, 7, 5, 3, 1]; s = 9; z = [1, 0, 0] | s += m[i] * (z[i % k] + 1) | i = 1; k = 3; m = [9, 7, 5, 3, 1]; s = 16; z = [1, 0, 0] |
j = 122; x = [4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120] | x.append(j) | j = 122; x = [4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122] |
i = 3; s = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0]] | s[i].append(0) | i = 3; s = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0]] |
m = 6; p = 'gh'; r = {(-1): [], (0): ['ab', 'ef', 'ab', 'ef'], (6): ['cd', 'gh', 'cd'], (4): ['ij']} | r[m].append(p) | m = 6; p = 'gh'; r = {-1: [], 0: ['ab', 'ef', 'ab', 'ef'], 6: ['cd', 'gh', 'cd', 'gh'], 4: ['ij']} |
i = 4; m = {'+': set(), '1': {1, 2, 3, 4, 5, 6}} | m['+'] ^= {i} | i = 4; m = {'+': {4}, '1': {1, 2, 3, 4, 5, 6}} |
h = [1, 2, 3, 3]; i = 1 | h.remove(i) | h = [2, 3, 3]; i = 1 |
i = '55335' | i = i[:-1] + '3' | i = '55333' |
e = 'BABABA'; j = 5; n = 'B' | n = e[j] | e = 'BABABA'; j = 5; n = 'A' |
x = 'a' | p += x | p = 'JICiiThza'; x = 'a' |
i = 16; p = [0, 1, 1, 1, 2, 3, 4, 5, 7, 10, 14, 19, 26, 36, 50, 69] | p.append(p[i - 1] + p[i - 4]) | i = 16; p = [0, 1, 1, 1, 2, 3, 4, 5, 7, 10, 14, 19, 26, 36, 50, 69, 95] |
d = [1, 2, 1, 2, 1, 2, 1, 2]; h = [1, 2, 1, 2, 1, 2, 1, 1]; i = 0 | z += max(d[i], h[i]) | d = [1, 2, 1, 2, 1, 2, 1, 2]; h = [1, 2, 1, 2, 1, 2, 1, 1]; i = 0; z = -66 |
i = 1; s = 'i', 'came', 'from'; x = ['i', 'came', 'from', 'the', 'moon'] | s = x[i], x[i + 1], x[i + 2] | i = 1; s = ('came', 'from', 'the'); x = ['i', 'came', 'from', 'the', 'moon'] |
j = 1; w = ['h', 'd', 'k', 'c'] | w.insert(j, w.pop(w[j:].index(min(w[j:])) + j)) | j = 1; w = ['h', 'c', 'd', 'k'] |
m = ['{', '{', '[', '['] | m.pop() | m = ['{', '{', '['] |
n = ['', 'abc', ''] | n.pop() | n = ['', 'abc'] |
l = ['ababaa', 'babaa', 'abaa', 'baa']; q = ['a', 'a'] | l.append(''.join(q)) | l = ['ababaa', 'babaa', 'abaa', 'baa', 'aa']; q = ['a', 'a'] |
k = 4 | j = k | j = 4; k = 4 |
j = 2 | o += str(j) + ' ' | j = 2; o = 'pAQI2 ' |
i = [2, 4, 2, 6, 1, 7, 8, 9, 2, 1]; x = """10\n2\n4\n2\n6\n1\n7\n8\n9\n2\n1\n\n\n\n""" | x = len(i) * [1] | i = [2, 4, 2, 6, 1, 7, 8, 9, 2, 1]; x = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] |
i = 0; v = [1, 2, 3, 3]; x = [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, 0, 0, 0, 0, 0, 0] | x[v[i]] += 1 | i = 0; v = [1, 2, 3, 3]; x = [0, 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, 0, 0, 0, 0] |
l = 106 | l += 1 | l = 107 |
k = [[0, 2], [1, 1]]; y = [2, 2] | y = [0] * len(k) | k = [[0, 2], [1, 1]]; y = [0, 0] |
c = 1; k = 1; l = [1, 0, 0, 0, 0] | l[k] = c | c = 1; k = 1; l = [1, 1, 0, 0, 0] |
x = 1, 1; z = 6 | z += max(x) | x = (1, 1); z = 7 |
i = ['dummy', [('a',), ('b',), ('b',)], [('a', 'b'), ('b', 'b'), ('a', 'b') ], [('a', 'b', 'b'), ('a', 'b', 'b')], [('a', 'a', 'b', 'b')]]; k = 'a',; n = [('a',), ('b',), ('b',)] | n.append(k) | i = ['dummy', [('a',), ('b',), ('b',)], [('a', 'b'), ('b', 'b'), ('a', 'b')], [('a', 'b', 'b'), ('a', 'b', 'b')], [('a', 'a', 'b', 'b')]]; k = ('a',); n = [('a',), ('b',), ('b',), ('a',)] |
g = [[], [], [3], []]; u = 2; v = 3 | g[v].append(u) | g = [[], [], [3], [2]]; u = 2; v = 3 |
f = ['we', 'do', 'what']; x = 'we' | f.append(x) | f = ['we', 'do', 'what', 'we']; x = 'we' |
a = 4; c = 26; p = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200]; u = 4 | c = p[u + a - 1] - p[u] | a = 4; c = 30; p = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200]; u = 4 |
g = [1, 1, 2]; i = 1; p = 11; u = [0, 1, 6, 4, 3, 9, 2, 8, 7, 5, 10] | g.append(g[-1] * u[i] % p) | g = [1, 1, 2, 2]; i = 1; p = 11; u = [0, 1, 6, 4, 3, 9, 2, 8, 7, 5, 10] |
c = 5; j = 4; p = 5; s = 4 | c = p + j * s | c = 21; j = 4; p = 5; s = 4 |
i = 6 | n = range(0, i + 1) | i = 6; n = range(0, 7) |
u = 2; y = 2 | y = u % 4 | u = 2; y = 2 |
c = 'd'; d = {'a': 2, 'b': 2, 'c': 1, 'd': 0} | d[c] += 1 | c = 'd'; d = {'a': 2, 'b': 2, 'c': 1, 'd': 1} |
e = [-5, -1, -1, 2, -2, -3]; i = []; x = 0 | i.append('1') if e[x] > 0 else i.append('0') | e = [-5, -1, -1, 2, -2, -3]; i = ['0']; x = 0 |
a = 3; m = [0, 2, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 2, 1, 0, 3, 2, 1, 1, 0, 1, 0, 1, 0, 2, 2] | m[a] += 1 | a = 3; m = [0, 2, 0, 2, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 2, 1, 0, 3, 2, 1, 1, 0, 1, 0, 1, 0, 2, 2] |
g = [-4]; l = [4, 3, 2, 3, 1] | g = l[1:] | g = [3, 2, 3, 1]; l = [4, 3, 2, 3, 1] |
o = 1; p = 'Q'; q = [['_', '_', '_', '_'], ['_', '_', '_', '_'], ['_', 'n', '_', '_'], ['_', '_', '_', '_']]; t = 3 | q[t][o] = p.lower() | o = 1; p = 'Q'; q = [['_', '_', '_', '_'], ['_', '_', '_', '_'], ['_', 'n', '_', '_'], ['_', 'q', '_', '_']]; t = 3 |
i = 17; s = 9; y = [63, 25, 73, 1, 98, 73, 56, 84, 86, 57, 16, 83, 82, 67, 61, 32, 21, 79, 75, 75, 13, 87, 70, 33] | s = y[i] | i = 17; s = 79; y = [63, 25, 73, 1, 98, 73, 56, 84, 86, 57, 16, 83, 82, 67, 61, 32, 21, 79, 75, 75, 13, 87, 70, 33] |
b = [1, 1, 1, 1, 1, 1, 1]; v = 1 | b.append(v) | b = [1, 1, 1, 1, 1, 1, 1, 1]; v = 1 |
g = [3, 4, 21, 36, 10, 28, 35, 5, 24, 42] | m = g[0] | g = [3, 4, 21, 36, 10, 28, 35, 5, 24, 42]; m = 3 |
i = 23; m = 64; y = 2199023255552 | y = 1 << m - i - 1 | i = 23; m = 64; y = 1099511627776 |
i = 3; m = {3, 4, 6}; q = [2, 1, 5, 3, 4] | m -= {q[i]} | i = 3; m = {4, 6}; q = [2, 1, 5, 3, 4] |
i = 2; r = 1 | r += 2 ** i | i = 2; r = 5 |
w = 'aacb'; x = 'ba' | w = w + x | w = 'aacbba'; x = 'ba' |
c = [0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 40912, 40913, 40914, 40915, 40916, 40917, 40918, 40919, 40920, 40921]; j = 4 | c[j] = 0 | c = [0, 0, 2, 3, 0, 5, 6, 7, 8, 9, 40912, 40913, 40914, 40915, 40916, 40917, 40918, 40919, 40920, 40921]; j = 4 |
i = 1; q = [[0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; w = 2; y = [1, 6, 9] | q[i][w] = max(y[i - 1] + q[i - 1][w - y[i - 1]], q[i - 1][w], y[i - 1] + q[ i][w - y[i - 1]]) | i = 1; q = [[0, 0, 0, 0, 0, 0], [0, 1, 2, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; w = 2; y = [1, 6, 9] |
r = 3 | f = r | f = 3; r = 3 |
d = 'dowhatwemustbecausewecan'; j = 23; u = 'whatwemustbecauseweca' | u += d[j] | d = 'dowhatwemustbecausewecan'; j = 23; u = 'whatwemustbecausewecan' |
o = [['203', '204', '204', '205', '206', '204']]; z = ['203', '204', '205', '206', '207', '208', '203', '204', '205', '206'] | z = o[0] if o else None | o = [['203', '204', '204', '205', '206', '204']]; z = ['203', '204', '204', '205', '206', '204'] |
e = 2; q = [2, 2, 3, 7]; s = 3; t = 3; z = 2 | t = q[e] - (z - s) | e = 2; q = [2, 2, 3, 7]; s = 3; t = 4; z = 2 |
d = [203, 204, 205, 206, 207, 208, 203, 204, 205, 206] | d.sort() | d = [203, 203, 204, 204, 205, 205, 206, 206, 207, 208] |
x = 'UPDATE 2 2 2 4' | x = x.split() | x = ['UPDATE', '2', '2', '2', '4'] |
h = 'q'; i = 0; l = 2; s = 'ifailuhkqq' | h = list(s[i:i + l]) | h = ['i', 'f']; i = 0; l = 2; s = 'ifailuhkqq' |
i = 5; j = {(1): {'l': 2, 'r': 3}, (2): {'l': -1, 'r': 4}, (3): {'l': -1, 'r': 5}, (4): {'l': -1, 'r': -1}, (5): {}}; l = -1 | j[i]['l'] = l | i = 5; j = {1: {'l': 2, 'r': 3}, 2: {'l': -1, 'r': 4}, 3: {'l': -1, 'r': 5}, 4: {'l': -1, 'r': -1}, 5: {'l': -1}}; l = -1 |
v = {(0): [], (1): []}; x = 2 | v[x] = [] | v = {0: [], 1: [], 2: []}; x = 2 |
o = 72; x = 9; y = 7.2 | y = o / x | o = 72; x = 9; y = 8.0 |
o = '99999' | o += '9' | o = '999999' |
c = 5; j = 5; m = [0, 1] | j = c - m[-1] - 1 | c = 5; j = 3; m = [0, 1] |
n = {'fi': 1, 'af': 1, 'ai': 1}; r = 'il' | n[r] = 1 | n = {'fi': 1, 'af': 1, 'ai': 1, 'il': 1}; r = 'il' |
l = 5; u = 3; x = [[1, 9], [2, 6]]; y = 6 | x.append([u, l + y]) | l = 5; u = 3; x = [[1, 9], [2, 6], [3, 11]]; y = 6 |
e = 5 | t = {i: i for i in range(e)} | e = 5; t = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4} |
i = 4; u = 5 | u += i | i = 4; u = 9 |
n = 2 | d = [[] for _ in range(n)] | d = [[], []]; n = 2 |
s = [4, 5]; w = {(1): [2], (2): [1, 3, 5], (3): [2], (5): [4, 6, 2], (4): [5], (6): [5]} | w[s[0]].remove(s[1]) | s = [4, 5]; w = {1: [2], 2: [1, 3, 5], 3: [2], 5: [4, 6, 2], 4: [], 6: [5]} |
a = 9 | a = a / 10 | a = 0.9 |
r = -3.0; x = [2.0, 1.0]; y = [5.0, 6.0] | r = x[0] * y[0] - x[1] * y[1] | r = 4.0; x = [2.0, 1.0]; y = [5.0, 6.0] |
k = 2; m = [0, 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, 0, 0, 0, 0] | m[k] = m[k - 1] * 2 | k = 2; m = [0, 1, 2, 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, 0, 0, 0] |
j = 5; q = 1; z = [2, 3, 1, 2, 3, 2, 3, 3] | q = min(q, z[j]) | j = 5; q = 1; z = [2, 3, 1, 2, 3, 2, 3, 3] |
i = 3; l = [1, 5, 10, 12, 111, 200, 1000]; s = 16 | s += l[i] | i = 3; l = [1, 5, 10, 12, 111, 200, 1000]; s = 28 |
j = 18 | j += i | i = -96; j = -78 |
a = ['aabghgh']; j = 2; s = ['aab', 'aac', 'aacghgh', 'aabghgh'] | a.append(s[j]) | a = ['aabghgh', 'aacghgh']; j = 2; s = ['aab', 'aac', 'aacghgh', 'aabghgh'] |
n = 8; q = 4 | q += n | n = 8; q = 12 |
i = 0; l = [2, 5, 6] | s += (i + 1) * max(l) | i = 0; l = [2, 5, 6]; s = 28 |
g = 2; n = 1 | g = min(n, 43) | g = 1; n = 1 |
a = [1, 2, 3, 4]; c = [1, 2, 3, 4, 4]; i = 1 | a.append(c[i]) | a = [1, 2, 3, 4, 2]; c = [1, 2, 3, 4, 4]; i = 1 |
e = [5, 5, 9]; f = [[0, 2, 1], [1, 1, 1], [2, 0, 0]]; i = 0 | e.append(sum(f[i])) | e = [5, 5, 9, 3]; f = [[0, 2, 1], [1, 1, 1], [2, 0, 0]]; i = 0 |
h = 1; i = 1; o = [1, 2, 2, 3, 3, 4] | h = max(h, o[i]) | h = 2; i = 1; o = [1, 2, 2, 3, 3, 4] |
j = 1; k = 1; z = 9 | z = k + j if k + j < z else z | j = 1; k = 1; z = 2 |
d = 1; i = 3; j = 4; q = [[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]] | q[i][j] = d | d = 1; i = 3; j = 4; q = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 0, 0]] |
p = [1, 1, 6]; x = 29 | x = sum(p) | p = [1, 1, 6]; x = 8 |
e = 'hACKERrANK.COM PRESENTS '; x = '"' | e += x.upper() | e = 'hACKERrANK.COM PRESENTS "'; x = '"' |
n = 0.00244140625 | n /= 2 | n = 0.001220703125 |
a = 2; b = 1547425049106725343623905280; l = 1547425049106725343623905440 | l += a ^ b | a = 2; b = 1547425049106725343623905280; l = 3094850098213450687247810722 |
m = {(1): {0, 1}}; r = 2; s = 1 | m[s].add(r) | m = {1: {0, 1, 2}}; r = 2; s = 1 |
q = 3; x = 2 | x = [(q, 0)] | q = 3; x = [(3, 0)] |
j = 64 | j >>= 1 | j = 32 |
p = [-1, -1, 6] | p.pop(0) | p = [-1, 6] |
n = 5; p = 6; x = 3; y = 2 | p += min(n - x - 1, y) | n = 5; p = 7; x = 3; y = 2 |
d = [0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]; v = 19 | d[v] = d[v] + 1 | d = [0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0]; v = 19 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.