start stringlengths 5 368 | code stringlengths 5 143 | end stringlengths 5 527 |
|---|---|---|
i = 2 | i = i + 5 | i = 7 |
a = '10'; b = '9' | b = a | a = '10'; b = '10' |
g = '999 1 1 1 0\n'; i = 1; p = ['2\n', '5\n', '999 1 1 1 0\n', '5\n', '0 1 1 1 999\n', '\n', '\n', '\n'] | g = p[2 + i * 2] | g = '0 1 1 1 999\n'; i = 1; p = ['2\n', '5\n', '999 1 1 1 0\n', '5\n', '0 1 1 1 999\n', '\n', '\n', '\n'] |
b = [1, 2]; x = 3 | b.append(x) | b = [1, 2, 3]; x = 3 |
n = [1, 2, 4, 5] | a.append(n) | a = [[1, 2, 4, 5]]; n = [1, 2, 4, 5] |
d = 2; h = 'x'; x = ['x', 'y', 'z'] | h += x[d] | d = 2; h = 'xz'; x = ['x', 'y', 'z'] |
c = [True, True, False, False, False]; n = 4 | c[n] = True | c = [True, True, False, False, True]; n = 4 |
h = [1, 2, 3, 4, 5]; i = 5; k = 8; n = 2; q = [0, 1] | k = h[n] * (i - q[-1] - 1) | h = [1, 2, 3, 4, 5]; i = 5; k = 9; n = 2; q = [0, 1] |
u = 'aabaacaba' | q = list(u) | q = ['a', 'a', 'b', 'a', 'a', 'c', 'a', 'b', 'a']; u = 'aabaacaba' |
c = 2; j = [1, 5]; o = 5 | j = [c, o] | c = 2; j = [2, 5]; o = 5 |
b = 1; i = 2; r = 1; s = [2, -1, 2, 3, 4, -5] | b = r + s[i] | b = 3; i = 2; r = 1; s = [2, -1, 2, 3, 4, -5] |
i = 61; w = 4 | i += w | i = 65; w = 4 |
d = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0}; i = 9 | d[chr(ord('a') + i)] = 0 | d = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0, 'j': 0}; i = 9 |
i = 10; m = {(10): 1, (20): 2} | m[i] = m.get(i, 0) + 1 | i = 10; m = {10: 2, 20: 2} |
i = 3; x = 2 | x = i | i = 3; x = 3 |
d = deque([4, 1, 2, 3]) | d.pop() | d = deque([4, 1, 2]) |
g = [[1, 1, 1, 1], [0, 0, 0, 0], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]; i = 4; j = 0; s = [2, 5, 3, 6]; x = 0 | x = g[i - s[j]][j] if i - s[j] >= 0 else 0 | g = [[1, 1, 1, 1], [0, 0, 0, 0], [1, 1, 1, 1], [0, 0, 1, 1], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]; i = 4; j = 0; s = [2, 5, 3, 6]; x = 1 |
l = 4; y = 'a', 'b', 'a', 'b' | l = len(y) | l = 4; y = ('a', 'b', 'a', 'b') |
c = 'b'; g = 6 | g = ord(c) - asc_base | b = -38; c = 'b'; g = 136 |
t = [-1, -1, 0, 2, -1, -1]; w = 4; y = [0, 0, 2, 4] | t[w] = y[w - 1] | t = [-1, -1, 0, 2, 4, -1]; w = 4; y = [0, 0, 2, 4] |
a = [1, 2, 1, 1, 1, 2, 1, 3]; i = 3; l = [1, 3, 4, 0, 0, 0, 0, 0] | l[i] = l[i - 1] + a[i] | a = [1, 2, 1, 1, 1, 2, 1, 3]; i = 3; l = [1, 3, 4, 5, 0, 0, 0, 0] |
k = '16'; x = 17 | k = str(x) | k = '17'; x = 17 |
h = [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1]; i = 9; s = [1, 11, 55, 165, 330, 462, 462, 330, 165] | s += [(h[i - 1] + h[i]) % 10 ** 9] | h = [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1]; i = 9; s = [1, 11, 55, 165, 330, 462, 462, 330, 165, 55] |
e = [0, 0, 1, 1, 2, 2, 0, 2, 0, 2]; j = 3 | e.append(j) | e = [0, 0, 1, 1, 2, 2, 0, 2, 0, 2, 3]; j = 3 |
n = 2; y = 1; z = 3 | z = 2 * n - 1 - y | n = 2; y = 1; z = 2 |
o = 'ABCDCDC' | g = len(o) | g = 7; o = 'ABCDCDC' |
k = 2; n = 8; q = 4 | q = (q + k) % n | k = 2; n = 8; q = 6 |
e = [[(-1, -1), 'X', '.'], [(0, 0), 'X', '.'], [(0, 0), '.', '.']]; h = 2, 1; j = 2, 0 | e[h[0]][h[1]] = j[0], j[1] | e = [[(-1, -1), 'X', '.'], [(0, 0), 'X', '.'], [(0, 0), (2, 0), '.']]; h = (2, 1); j = (2, 0) |
c = [[1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 2, 4, 4, 0], [0, 0, 0, 2, 0, 0], [0, 0, 1, 2, 4, 0]]; i = 0; j = 2; v = 2 | v = c[i + 2][j] + c[i + 2][j + 1] + c[i + 2][j + 2] | c = [[1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 2, 4, 4, 0], [0, 0, 0, 2, 0, 0], [0, 0, 1, 2, 4, 0]]; i = 0; j = 2; v = 1 |
k = [1, 1, 1, 1] | k.append(1) | k = [1, 1, 1, 1, 1] |
r = [1]; v = 4 | r.append(v) | r = [1, 4]; v = 4 |
d = 5; i = 2; j = 0; l = ['e'] | l.append(alphabets[d - i + j]) | d = 5; i = 2; j = 0; l = ['e', 'J']; q = 'WPKJL' |
j = 3; k = '999'; m = 3; p = '999100010011002'; s = '999100010001' | p, k, m = s[:j + 1], s[:j + 1], 0 | j = 3; k = '9991'; m = 0; p = '9991'; s = '999100010001' |
g = 5; i = 2; k = [0, 1, 1, 1, 999]; m = 1; o = [0, 0, 0, 0, 0, 0] | m = max(m, k[i] + k[i + 1] + o[min(i + 2, g)]) | g = 5; i = 2; k = [0, 1, 1, 1, 999]; m = 2; o = [0, 0, 0, 0, 0, 0] |
b = [1, 1, 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]; j = 30 | b[-j] = 0 | b = [1, 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]; j = 30 |
j = 0; l = [95.0, 92.0, 95.0]; t = [121.0, 139.0, 152.0] | t[j] += l[j] | j = 0; l = [95.0, 92.0, 95.0]; t = [216.0, 139.0, 152.0] |
b = [True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True]; m = 0 | b[m] = False | b = [False, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True]; m = 0 |
f = 12; i = 7; s = 'abccddde' | f += ord(s[i]) - ord('a') + 1 | f = 17; i = 7; s = 'abccddde' |
q = 'o'; x = 'c' | q = x | q = 'c'; x = 'c' |
e = ['e', 'd', 'e', 'd', 'd', 'e', 'e', 'd'] | e.reverse() | e = ['d', 'e', 'e', 'd', 'd', 'e', 'd', 'e'] |
p = 4 | x = p | p = 4; x = 4 |
a = [1, 3, 5, 7, 9] | w = a[0] | a = [1, 3, 5, 7, 9]; w = 1 |
a = 10; r = 19 | a = r | a = 19; r = 19 |
i = 8; z = ['h', 'A', 'C', 'K', 'E', 'R', 'r', 'A', 'n', 'k', 'o', 'n', 'i', 's', 't', ' ', '2', '"', '.'] | z[i] = z[i].upper() | i = 8; z = ['h', 'A', 'C', 'K', 'E', 'R', 'r', 'A', 'N', 'k', 'o', 'n', 'i', 's', 't', ' ', '2', '"', '.'] |
i = 8; k = ['2', '2', '2', '2', '2', '2', '2']; t = ['2', '2', '2', '2', '2']; y = 3 | t = k[y:i] | i = 8; k = ['2', '2', '2', '2', '2', '2', '2']; t = ['2', '2', '2', '2']; y = 3 |
g = 2; n = 3; s = 'hefg' | s = s[:g] + s[n] + s[g + 1:n] + s[g] + s[n + 1:] | g = 2; n = 3; s = 'hegf' |
k = {(3): 0, (9): 1, (6): 2}; s = 3 | f = k[s] | f = 0; k = {3: 0, 9: 1, 6: 2}; s = 3 |
b = 5; h = 174 | h += b * b | b = 5; h = 199 |
c = '{[()]}'; i = 1; n = ['{'] | n.append(c[i]) | c = '{[()]}'; i = 1; n = ['{', '['] |
c = [0, 0, 0, 0, 0, 0]; i = 0; r = 5; z = [0, 3, 2, 1, 0, 0] | c[i] = min(z[min(i + 1, r)], z[min(i + 2, r)], z[min(i + 3, r)]) | c = [1, 0, 0, 0, 0, 0]; i = 0; r = 5; z = [0, 3, 2, 1, 0, 0] |
i = 4; k = 0; m = [[1, 2, 2], [1, 1, 0], [1, 2, 1]]; p = 3; t = 2 | t += m[p % 3][k - (i - 1 - p)] | i = 4; k = 0; m = [[1, 2, 2], [1, 1, 0], [1, 2, 1]]; p = 3; t = 3 |
o = 2 | s = o | o = 2; s = 2 |
i = 5; n = [(0, '-'), (6, '-'), (0, '-'), (6, '-'), (4, '-'), (2, 'not'), (4, 'is' ), (2, 'to'), (4, 'the')]; v = [[(0, '-'), (2, '-')], [], [], [], [(4, '-')], [], [(1, '-'), (3, '-')], [], [], [], [], [], []] | v[n[i][0]].append((i, n[i][1])) | i = 5; n = [(0, '-'), (6, '-'), (0, '-'), (6, '-'), (4, '-'), (2, 'not'), (4, 'is'), (2, 'to'), (4, 'the')]; v = [[(0, '-'), (2, '-')], [], [(5, 'not')], [], [(4, '-')], [], [(1, '-'), (3, '-')], [], [], [], [], [], []] |
b = ['d', 'c'] | b.sort() | b = ['c', 'd'] |
b = 'B_RRBR'; s = '_'; t = 2 | t = len([s for s in b if s == '_']) | b = 'B_RRBR'; s = '_'; t = 1 |
b = 'aba'; s = 8 | s += len(b) | b = 'aba'; s = 11 |
c = 'u'; i = 9; l = 'middle-Outz' | c = l[i] | c = 't'; i = 9; l = 'middle-Outz' |
b = [[1, 3], [3, 4], [2, 4], [1, 2], [2, 3]]; h = [5, 6] | b.append(h) | b = [[1, 3], [3, 4], [2, 4], [1, 2], [2, 3], [5, 6]]; h = [5, 6] |
a = [1, 3, 6]; s = 9 | a.append(s) | a = [1, 3, 6, 9]; s = 9 |
b = '1110001'; i = 3; n = 2; r = '101' | r += str(int(b[i]) ^ int(b[i - 1]) ^ int(r[i - n])) | b = '1110001'; i = 3; n = 2; r = '1011' |
a = 7; b = 4; l = '34534985349875439875439875349875 93475349759384754395743975349573495\n' | a, b = list(map(int, l.split())) | a = 34534985349875439875439875349875; b = 93475349759384754395743975349573495; l = '34534985349875439875439875349875 93475349759384754395743975349573495\n' |
f = 3; t = [0.32, 0.64, 0.76]; z = [0.32, 0.32, 0.12, 0.04, 0.07, 0.13] | t.append(z[f] + t[f - 1]) | f = 3; t = [0.32, 0.64, 0.76, 0.8]; z = [0.32, 0.32, 0.12, 0.04, 0.07, 0.13] |
f = 2; w = 'aacghgh' | f = ord(w[0]) - ord('a') | f = 0; w = 'aacghgh' |
w = 3; z = 3 | z = z + w | w = 3; z = 6 |
a = 2147483647 | b = ~a | a = 2147483647; b = -2147483648 |
e = 7; j = 2; t = 3; u = [3, 3, 9, 9, 5] | t = (t + u[j]) % e | e = 7; j = 2; t = 5; u = [3, 3, 9, 9, 5] |
i = 0; k = ['+', '+', '+', '+'] | k[i] = '-' | i = 0; k = ['-', '+', '+', '+'] |
c = {'c': 2, 'd': 2, 'cd': 1}; g = 'cd' | c[g] += 1 | c = {'c': 2, 'd': 2, 'cd': 2}; g = 'cd' |
d = 4 | a = d | a = 4; d = 4 |
e = -2; i = 1; j = 0; y = [[0, inf, inf, inf, inf], [-2, -2, inf, inf, inf], [inf, inf, inf, inf, inf], [inf, inf, inf, inf, inf], [inf, inf, inf, inf, inf]] | y[i + 1][j + 1] = e | e = -2; i = 1; j = 0; y = [[0, inf, inf, inf, inf], [-2, -2, inf, inf, inf], [inf, -2, inf, inf, inf], [inf, inf, inf, inf, inf], [inf, inf, inf, inf, inf]] |
v = [[1, 3, 4]]; x = [2, 2, 3] | v.append(x) | v = [[1, 3, 4], [2, 2, 3]]; x = [2, 2, 3] |
k = 4; l = 1 | r = {k, l} | k = 4; l = 1; r = {1, 4} |
a = 3, 1, 2; i = 1; z = 2 | z = max(z, a[i] ^ a[i + 1]) | a = (3, 1, 2); i = 1; z = 3 |
k = 4; l = 0; y = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200] | v = y[l + k - 1] - y[l] | k = 4; l = 0; v = 3; y = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200] |
e = [['c']]; i = 0; j = 2; s = 'cdcd' | e.append(sorted(list(s[i:j]))) | e = [['c'], ['c', 'd']]; i = 0; j = 2; s = 'cdcd' |
n = [5, 2]; x = 6 | x = max(n) | n = [5, 2]; x = 5 |
b = [1, 2, 3]; d = [4, 5] | b.append(d.pop(0)) | b = [1, 2, 3, 4]; d = [5] |
i = 'grand'; x = {'give': 1, 'me': 1, 'one': 1} | x[i] = 0 | i = 'grand'; x = {'give': 1, 'me': 1, 'one': 1, 'grand': 0} |
h = {'a': 0, 'e': 0, 'i': 1, 'o': 1, 'u': 1}; i = 7; s = 'aeiouuoiea' | h[s[i]] -= 1 | h = {'a': 0, 'e': 0, 'i': 0, 'o': 1, 'u': 1}; i = 7; s = 'aeiouuoiea' |
h = 1.6; n = 3 | h += n / 2 | h = 3.1; n = 3 |
c = '1'; r = '991000' | r += c | c = '1'; r = '9910001' |
a = 2; o = 5; u = 6 | u = a + o | a = 2; o = 5; u = 7 |
a = 3; h = 199 | h = a | a = 3; h = 3 |
i = 10; j = 15; x = 4 | x = i ^ j | i = 10; j = 15; x = 5 |
c = 2; g = [1, 3, 3, 4, 5, 6]; i = 0 | g[i + 1] = c | c = 2; g = [1, 2, 3, 4, 5, 6]; i = 0 |
e = 50; g = ['50', '13', '2']; i = 2 | e = e ^ int(g[i]) | e = 48; g = ['50', '13', '2']; i = 2 |
j = 2; m = [1, 2, 5, 3, 4]; x = 2 | x = m[j] | j = 2; m = [1, 2, 5, 3, 4]; x = 5 |
k = [1, 3] | z.append(k) | k = [1, 3]; z = [[1, 3]] |
a = [0, 4, 4, 3, 2, 0, 2, 2]; i = 2; v = [[4, 3]] | v.insert(i, [a[2 * i], a[2 * i + 1]]) | a = [0, 4, 4, 3, 2, 0, 2, 2]; i = 2; v = [[4, 3], [2, 0]] |
s = '12345BCDEF'; u = ['5', '1', 'B', 'C', 'D', '3', '0', '2', '4'] | u = list(set(s)) | s = '12345BCDEF'; u = ['E', 'C', 'F', '3', '2', 'B', '5', '1', 'D', '4'] |
e = 200; i = 4; k = 3; w = [10, 20, 30, 100, 200, 300, 1000] | e = w[i + k - 1] - w[i] | e = 800; i = 4; k = 3; w = [10, 20, 30, 100, 200, 300, 1000] |
b = 'bb'; n = 2 | n = len(b) | b = 'bb'; n = 2 |
i = 0; p = array([1.1, 2.0, 3.0]); x = array([0.0]); y = array([0.0]) | y = y * x + p[i] | i = 0; p = array([1.1, 2. , 3. ]); x = array([0.]); y = array([1.1]) |
d = 5; i = 6; n = [0, 0, 1, 2, 1, 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]; q = [2, 3, 4, 2, 3, 6, 8, 4, 5] | n[q[i - d]] -= 1 | d = 5; i = 6; n = [0, 0, 1, 1, 1, 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]; q = [2, 3, 4, 2, 3, 6, 8, 4, 5] |
b = '1'; q = '100' | q = b | b = '1'; q = '1' |
g = [[1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 2, 4, 4, 0], [0, 0, 0, 2, 0, 0], [0, 0, 1, 2, 4, 0]]; i = 1; j = 3; q = 10 | q = g[i + 2][j] + g[i + 2][j + 1] + g[i + 2][j + 2] | g = [[1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 2, 4, 4, 0], [0, 0, 0, 2, 0, 0], [0, 0, 1, 2, 4, 0]]; i = 1; j = 3; q = 8 |
a = {'two': 1, 'times': 1}; w = 'two' | a[w] += 1 | a = {'two': 2, 'times': 1}; w = 'two' |
a = 2; n = 6 | a = n % 8 | a = 6; n = 6 |
c = ['drawing', 'room', '']; w = ['i came from', 'the moon he', 'went to the', 'other room she', 'went to the'] | w.append(' '.join(c)) | c = ['drawing', 'room', '']; w = ['i came from', 'the moon he', 'went to the', 'other room she', 'went to the', 'drawing room '] |
i = 3; j = 1; l = 'cdcd'; x = 'ccd' | x = ''.join(sorted(l[j:j + i])) | i = 3; j = 1; l = 'cdcd'; x = 'cdd' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.