start stringlengths 5 368 | code stringlengths 5 143 | end stringlengths 5 527 |
|---|---|---|
c = 'B'; k = 'A' | k = c | c = 'B'; k = 'B' |
a = 4; b = 5; i = 8; k = 'aba'; p = [4, 8, 12, 16, 17, 21, 25, 26, 0] | p[i] = min(p[i - 1] + a, p[i - len(k)] + b) | a = 4; b = 5; i = 8; k = 'aba'; p = [4, 8, 12, 16, 17, 21, 25, 26, 26] |
f = 1000007; n = 40921; y = 901412 | y = y * n % f | f = 1000007; n = 40921; y = 422250 |
d = [2, 4]; l = '5 5 5\n'; x = 1 | d = [int(x) for x in l.split(' ')] | d = [5, 5, 5]; l = '5 5 5\n'; x = 1 |
c = 1; i = 2; j = 1; r = 2 | r, c = j, i - j | c = 1; i = 2; j = 1; r = 1 |
j = 1; l = [0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1] | l.append(j) | j = 1; l = [0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1] |
t = 1 | c += t | c = 31; t = 1 |
d = [13, 754, 39, 52]; i = 2; j = 4; q = ['13', '29', '71'] | d[j - 1] = int(d[j - 1]) * int(q[i - 1]) | d = [13, 754, 39, 1508]; i = 2; j = 4; q = ['13', '29', '71'] |
j = 1; y = [2] | y.extend([j]) | j = 1; y = [2, 1] |
i = 2; j = 80; l = 3; s = [10, 20, 30, 100, 200, 300, 1000] | j = s[i + l - 1] - s[i] | i = 2; j = 170; l = 3; s = [10, 20, 30, 100, 200, 300, 1000] |
h = [[3, 2, 1, 1, 1], [4, 3, 2], [1, 1, 4, 1]]; i = [5, 5, 6]; n = [1, 1, 1]; r = 2 | i[r] += h[r][n[r] - 1] | h = [[3, 2, 1, 1, 1], [4, 3, 2], [1, 1, 4, 1]]; i = [5, 5, 7]; n = [1, 1, 1]; r = 2 |
l = [70, 70, 78]; x = [73, 48, 95, 95, 33, 47, 98, 91, 95, 93] | x.append(l[0]) | l = [70, 70, 78]; x = [73, 48, 95, 95, 33, 47, 98, 91, 95, 93, 70] |
i = 4, 7, 9; m = 1000; t = 129 | t = sum([(x * x) for x in i]) % m | i = (4, 7, 9); m = 1000; t = 146 |
a = [1, 3, 4, 5, 2, 6]; p = 3; s = 1 | a[s], a[p] = a[p], a[s] | a = [1, 5, 4, 3, 2, 6]; p = 3; s = 1 |
b = ['D', 'D', '_', '_', 'F', 'Q', '_', 'Q', 'Q', 'F']; i = 4; z = {'D': 2} | z[b[i]] = 1 | b = ['D', 'D', '_', '_', 'F', 'Q', '_', 'Q', 'Q', 'F']; i = 4; z = {'D': 2, 'F': 1} |
i = 7; l = [1, 1, 1, 1, 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] | l[i] = 1 | i = 7; l = [1, 1, 1, 1, 1, 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] |
i = 6; j = 10; q = 'ifailuhkqq'; s = ['i', 'if', 'ifa', 'ifai', 'ifail', 'ifailu', 'ifailuh', 'uhk', 'uhkq', 'uhkqq', 'h', 'hk', 'hkq'] | s.append(q[i:j]) | i = 6; j = 10; q = 'ifailuhkqq'; s = ['i', 'if', 'ifa', 'ifai', 'ifail', 'ifailu', 'ifailuh', 'uhk', 'uhkq', 'uhkqq', 'h', 'hk', 'hkq', 'hkqq'] |
f = [63, 25, 73, 1, 98, 73, 56, 84, 86, 57, 16, 83, 82, 67, 61, 32, 21, 79, 75, 75, 13, 87, 70, 33]; n = [0, 2, 0, 2, 0, 0, 1, 0, 1, 2, 1, 0, 1, 1, 0, 0, 0, 1, 2, 1, 1, 1, 3, 0, 2, 0, 0, 2, 0, 3, 3, 1]; x = 35 | n.append(f.count(x)) | f = [63, 25, 73, 1, 98, 73, 56, 84, 86, 57, 16, 83, 82, 67, 61, 32, 21, 79, 75, 75, 13, 87, 70, 33]; n = [0, 2, 0, 2, 0, 0, 1, 0, 1, 2, 1, 0, 1, 1, 0, 0, 0, 1, 2, 1, 1, 1, 3, 0, 2, 0, 0, 2, 0, 3, 3, 1, 0]; x = 35 |
p = 0; y = [4, 2] | s = y[p] | p = 0; s = 4; y = [4, 2] |
d = [[0, inf, inf, inf, inf], [-1, -3, inf, inf, inf], [-4, -4, -12, inf, inf], [-7, -1, -7, inf, inf], [inf, inf, inf, inf, inf]]; i = 3; j = 0; y = 2 | d[i + 1][j + 1] = y | d = [[0, inf, inf, inf, inf], [-1, -3, inf, inf, inf], [-4, -4, -12, inf, inf], [-7, -1, -7, inf, inf], [inf, 2, inf, inf, inf]]; i = 3; j = 0; y = 2 |
d = {'i': 1, 'fi': 1, 'afi': 1, 'afii': 1}; s = 'afiil' | d[s] = d.get(s, 0) + 1 | d = {'i': 1, 'fi': 1, 'afi': 1, 'afii': 1, 'afiil': 1}; s = 'afiil' |
f = [7, 4, 2, 0, 0, 4, 8, 10, 8, 4, 3]; o = 6 | f.append(o) | f = [7, 4, 2, 0, 0, 4, 8, 10, 8, 4, 3, 6]; o = 6 |
b = 'o'; i = 1150805 | i += ord(b) | b = 'o'; i = 1150916 |
b = [0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; x = 'h' | b[ord(x) - 97] += 1 | b = [0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; x = 'h' |
k = 4; w = [6, 2, 2, 1, 3, 1, 4, 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] | w[k] += 1 | k = 4; w = [6, 2, 2, 1, 4, 1, 4, 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] |
h = {128, 256, 384, 136, 264, 392, 144, 272, 400, 152, 280, 408, 160, 288, 416, 168, 296, 176, 304, ...}; x = 53 | h.add(x * 8) | h = {128, 256, 384, 136, 264, 392, 144, 272, 400, 280, 408, 152, 160, 288, 416, 168, 296, 424, 176, 304, Ellipsis}; x = 53 |
a = 2; r = '1' | r += str(a) | a = 2; r = '12' |
d = 140420417469488; x = 1 | d = id(x) | d = 94444398986016; x = 1 |
e = 9.313225746154785e-10 | e /= 2 | e = 4.656612873077393e-10 |
f = 2; i = 1; o = 2; w = [['l', 'm', 'o', 'n'], ['d', 'c', 'b', 'a'], ['d', 'c', 'b', 'b'], ['a', 'b', 'd', 'c'], ['a', 'b', 'c', 'd'], ['f', 'e', 'd', 'b', 'c', 'd']] | w[i][f], w[i][o] = w[i][o], w[i][f] | f = 2; i = 1; o = 2; w = [['l', 'm', 'o', 'n'], ['d', 'c', 'b', 'a'], ['d', 'c', 'b', 'b'], ['a', 'b', 'd', 'c'], ['a', 'b', 'c', 'd'], ['f', 'e', 'd', 'b', 'c', 'd']] |
j = ['0', '0', '0', '0', '0', '1'] | j.insert(0, '0') | j = ['0', '0', '0', '0', '0', '0', '1'] |
a = 'hACKERrANK.COM PRESENTS "pYTHO'; s = 'HackerRank.com presents "Pythonist 2".'; x = 30 | a += s[x].upper() | a = 'hACKERrANK.COM PRESENTS "pYTHON'; s = 'HackerRank.com presents "Pythonist 2".'; x = 30 |
b = 'BB' | b = b[1:] | b = 'B' |
p = [3, 4]; r = ['1', '2'] | p = [int(e) for e in r if e.isnumeric()] | p = [1, 2]; r = ['1', '2'] |
m = 4; n = 4 | k = n * m | k = 16; m = 4; n = 4 |
i = 5; j = ['B', 'A', 'B', 'A', 'B']; s = 'BABABA' | j.append(s[i]) | i = 5; j = ['B', 'A', 'B', 'A', 'B', 'A']; s = 'BABABA' |
s = 1 | c.append(s) | c = [1]; s = 1 |
e = [2]; m = 3 | m = e.pop(0) | e = []; m = 2 |
a = ['5', '1', '2', '3']; t = '4' | a.append(t) | a = ['5', '1', '2', '3', '4']; t = '4' |
q = '2\n' | w.append(int(q)) | q = '2\n'; w = [2] |
g = [10, 1, 10, 1, 10]; h = 18; i = 2; l = 9 | h = max(l + g[i + 1] - 1, h + abs(g[i + 1] - g[i])) | g = [10, 1, 10, 1, 10]; h = 27; i = 2; l = 9 |
f = 1; h = 2 | f = max(h, f) | f = 2; h = 2 |
o = 2; v = 0; y = 9 | v = (o + y) % 10 | o = 2; v = 1; y = 9 |
a = [0, 2, 0, 2, 0, 0, 1, 0, 1, 2, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 2, 1, 3, 2, 0, 0]; i = 73; p = [63, 25, 73, 1, 98, 73, 56, 84, 86, 57, 16, 83, 82, 67, 61, 32, 21, 79, 75, 75, 13, 87, 70, 33] | a.append(p.count(i)) | a = [0, 2, 0, 2, 0, 0, 1, 0, 1, 2, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 2, 1, 3, 2, 0, 0, 2]; i = 73; p = [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.0248496961770481; m = 15.124248480885242 | m += b | b = 1.0248496961770481; m = 16.149098177062292 |
k = 1; n = 5 | u = n ** 2 - 4 * n * k | k = 1; n = 5; u = 5 |
y = 1 | c = y | c = 1; y = 1 |
k = 8 | k += 4 | k = 12 |
a = [2, 2, 4, 3]; i = 1; j = 3; n = 4; x = [0, 4, 6, 5, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0] | x[n * i + j] = a[i] + a[j] | a = [2, 2, 4, 3]; i = 1; j = 3; n = 4; x = [0, 4, 6, 5, 0, 0, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0] |
x = -102.7 | x -= 1 | x = -103.7 |
j = 2; l = 0; r = 'b'; t = ['abcdde', 'baccd', 'eeabg'] | l = t[j].find(r) | j = 2; l = 3; r = 'b'; t = ['abcdde', 'baccd', 'eeabg'] |
b = 95; c = [76, 76, 95, 96, 79, 74, 97, 97, 90, 90, 78, 91, 76, 90, 95] | c.append(b) | b = 95; c = [76, 76, 95, 96, 79, 74, 97, 97, 90, 90, 78, 91, 76, 90, 95, 95] |
x = 'ifailuhkqq' | x = list(x) | x = ['i', 'f', 'a', 'i', 'l', 'u', 'h', 'k', 'q', 'q'] |
d = 2.6645352591003757e-15; n = 1.3322676295501878e-15; p = 2 | d = n % p | d = 1.3322676295501878e-15; n = 1.3322676295501878e-15; p = 2 |
i = 5; j = 3; n = [[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]]; r = 1 | r = r + n[i][j] - n[i][j - 3] | i = 5; j = 3; n = [[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]]; r = 3 |
i = 1; o = [[0, 0, -1, -1], []] | o[i].append(-1) | i = 1; o = [[0, 0, -1, -1], [-1]] |
f = [[1], [1, 1], [1]]; i = 2; j = 0 | f[i].append((f[i - 1][j] + f[i - 1][j + 1]) % 10 ** 9) | f = [[1], [1, 1], [1, 2]]; i = 2; j = 0 |
i = 9; j = -2 | j = 8 + i % 2 | i = 9; j = 9 |
n = 20; x = [76, 76, 95, 96, 79, 74, 97, 97, 90, 90, 78, 91, 76, 90, 95, 95, 75, 100, 87, 90] | n = len(x) | n = 20; x = [76, 76, 95, 96, 79, 74, 97, 97, 90, 90, 78, 91, 76, 90, 95, 95, 75, 100, 87, 90] |
i = 1; s = '9899100'; x = 7 | x = int(s[:i]) | i = 1; s = '9899100'; x = 9 |
h = 33; j = 11 | h = j | h = 11; j = 11 |
a = [2, 0, 0, 0, 3, 0, 0, 0]; i = 4; o = [3, 0, 0, 1] | o[a[i]] -= 1 | a = [2, 0, 0, 0, 3, 0, 0, 0]; i = 4; o = [3, 0, 0, 0] |
s = 3 | s -= 1 | s = 2 |
m = 1 | k += m | k = 17; m = 1 |
a = [2, 4, 3, 5, 2, 6, 4, 5]; i = 6; k = [[False, False], [True, True], [False, False], [True, True], [False, False], [True, True], [], []]; n = 8 | k[i] = [i > 0 and a[i - 1] < a[i], i < n - 1 and a[i + 1] < a[i]] | a = [2, 4, 3, 5, 2, 6, 4, 5]; i = 6; k = [[False, False], [True, True], [False, False], [True, True], [False, False], [True, True], [False, False], []]; n = 8 |
d = 9; h = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'] | h.append(chr(ord('a') + d)) | d = 9; h = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'] |
v = 12 | v += 1 | v = 13 |
i = 0; j = ['i', 'came', 'from', 'the', 'moon.', 'he', 'went', 'she', 'went', 'to', 'the', 'drawing', 'room.'] | c = j[i].strip() | c = 'i'; i = 0; j = ['i', 'came', 'from', 'the', 'moon.', 'he', 'went', 'she', 'went', 'to', 'the', 'drawing', 'room.'] |
h = 'ab' | c = len(h) | c = 2; h = 'ab' |
q = 3 | i = q - 1 | i = 2; q = 3 |
a = ['.', 'X', '.', 'X']; c = '.' | a.append(c) | a = ['.', 'X', '.', 'X', '.']; c = '.' |
k = 1.9073486328125e-06 | k /= 2 | k = 9.5367431640625e-07 |
b = 2; i = 1; y = [] | y.append((i, b)) | b = 2; i = 1; y = [(1, 2)] |
c = 8388607; i = 23 | c |= 1 << i | c = 16777215; i = 23 |
h = 3; i = 2; j = 1 | i, j = 0, h - 1 | h = 3; i = 0; j = 2 |
e = 'banana'; f = {}; i = 0; m = 'nan' | f[i] = int(e[i] != m[0]) | e = 'banana'; f = {0: 1}; i = 0; m = 'nan' |
d = {(2): 1, (3): 1, (6): 1, (8): 1}; p = 4 | d[p] = 0 | d = {2: 1, 3: 1, 6: 1, 8: 1, 4: 0}; p = 4 |
c = [0, 0, 1, 0, 0, 1, 1, 0]; k = 2 | m = c[::k] | c = [0, 0, 1, 0, 0, 1, 1, 0]; k = 2; m = [0, 1, 0, 1] |
c = 2; d = 8; r = 1; u = [[1, 1, 1, 2], [1, 'X', 1, 2], [1, 8, 9, 2], [1, 2, 3, 4]] | d = u[r + 1][c] | c = 2; d = 9; r = 1; u = [[1, 1, 1, 2], [1, 'X', 1, 2], [1, 8, 9, 2], [1, 2, 3, 4]] |
d = 24; u = 1; v = 2; y = {(0): {}, (1): {}, (2): {}, (3): {}, (4): {}} | y[u][v] = d | d = 24; u = 1; v = 2; y = {0: {}, 1: {2: 24}, 2: {}, 3: {}, 4: {}} |
c = [4, 5, 6]; i = 1; m = [5, 3] | c = m[i:] | c = [3]; i = 1; m = [5, 3] |
b = 'afhiiklqqu'; i = 1; j = 1; t = 'ifailuhkqq' | b = ''.join(sorted(t[i:j + 1])) | b = 'f'; i = 1; j = 1; t = 'ifailuhkqq' |
d = 4690; z = 4162 | d += z | d = 8852; z = 4162 |
b = 5; p = 2; z = 3 | b += min(p, z) | b = 7; p = 2; z = 3 |
j = [2, 4, 3, 5, 2]; k = 6 | j.append(k) | j = [2, 4, 3, 5, 2, 6]; k = 6 |
e = 0.199999999999988; p = 8.399999999999975 | e = p / 42 | e = 0.19999999999999943; p = 8.399999999999975 |
a = 6; c = [[4, 2], [4, 1], [3, 2], [2, 2], [2, 1], [1, 2], [1, 2], [1, 1]]; k = 7; n = 36 | n = n + c[k][0] * a | a = 6; c = [[4, 2], [4, 1], [3, 2], [2, 2], [2, 1], [1, 2], [1, 2], [1, 1]]; k = 7; n = 42 |
a = [1, 0, 3]; i = 2; t = 1 | t ^= a[i] | a = [1, 0, 3]; i = 2; t = 2 |
h = '1111111' | h += '1' | h = '11111111' |
a = [1, 3, 4, 5, 6, 2]; s = 5; v = 6 | v = a[s] | a = [1, 3, 4, 5, 6, 2]; s = 5; v = 2 |
a = [13, 26, 39, '4']; h = ['13', '29', '71']; i = 1; j = 4 | a[j - 1] = int(a[j - 1]) * int(h[i - 1]) | a = [13, 26, 39, 52]; h = ['13', '29', '71']; i = 1; j = 4 |
f = 1; k = 3; m = [(1, 9), (2, 5)] | k += m[f][1] | f = 1; k = 8; m = [(1, 9), (2, 5)] |
i = 4; p = ['i', 'fi', 'afi', 'afii', 'afiil', 'afiilu', 'afhiklqu', 'afhiklqqu', 'a', 'ai', 'ail', 'ailu']; s = 'ailuhkqq' | p.append(''.join(sorted(s[:i + 1]))) | i = 4; p = ['i', 'fi', 'afi', 'afii', 'afiil', 'afiilu', 'afhiklqu', 'afhiklqqu', 'a', 'ai', 'ail', 'ailu', 'ahilu']; s = 'ailuhkqq' |
t = {'a': 1, 'b': 1, 'c': 1, 'd': 1, 'e': 1, 'f': 1, 'g': 1, 'h': 1}; x = 'h' | t[x] += 1 | t = {'a': 1, 'b': 1, 'c': 1, 'd': 1, 'e': 1, 'f': 1, 'g': 1, 'h': 2}; x = 'h' |
c = '3'; p = ['1'] | p.append(c) | c = '3'; p = ['1', '3'] |
g = 5; o = 10; r = 2; s = '7891011' | o = int(s[g:g + r]) | g = 5; o = 11; r = 2; s = '7891011' |
k = 4 | k = k + 1 | k = 5 |
e = '22'; g = 2 | g = int(e) | e = '22'; g = 22 |
f = 7; n = 8 | f = n | f = 8; n = 8 |
b = [4, 5, 6]; i = ['10', '8', '-12']; j = 0 | b.append(int(i[j])) | b = [4, 5, 6, 10]; i = ['10', '8', '-12']; j = 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.