start stringlengths 5 368 | code stringlengths 5 143 | end stringlengths 5 527 |
|---|---|---|
f = 300; i = 1; w = [[300, 2], [500, 3], [100, 5], [120, 10]] | f = w[i][0] | f = 500; i = 1; w = [[300, 2], [500, 3], [100, 5], [120, 10]] |
e = 99 | q = [(0) for i in range(e + 1)] | e = 99; 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
m = 'AAABB'; s = 'AAABBB' | s = m | m = 'AAABB'; s = 'AAABB' |
d = {('c',): 2, ('d',): 1}; h = 'd', | d[h] += 1 | d = {('c',): 2, ('d',): 2}; h = ('d',) |
c = 'GAAATAAA'; j = 0 | r = c[j] | c = 'GAAATAAA'; j = 0; r = 'G' |
a = [2, 3, 1]; l = 2; r = 3; t = [3, 1] | t = a[l:r] | a = [2, 3, 1]; l = 2; r = 3; t = [1] |
k = 2 | k = k + 1 | k = 3 |
t = 3 | t += 1 | t = 4 |
d = [0, 0, 0]; v = [[0, 0, 0], [0, 0, 0]] | v.append(d) | d = [0, 0, 0]; v = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] |
i = 7 | i = i + 1 | i = 8 |
b = ['161', '182', '161', '154', '176', '170', '167', '171', '170', '174']; c = [161]; i = 1 | c.append(int(b[i])) | b = ['161', '182', '161', '154', '176', '170', '167', '171', '170', '174']; c = [161, 182]; i = 1 |
k = [26]; o = 26 | k.append(o) | k = [26, 26]; o = 26 |
m = 4; o = [1, 1, 2, 3, 2] | o[m] = o[m - 1] | m = 4; o = [1, 1, 2, 3, 3] |
d = 1.2000000000000006e-41 | d /= 10 | d = 1.2000000000000007e-42 |
l = [1] | j.append(l) | j = [[1]]; l = [1] |
p = 84; v = [5184, 4489, 8464, 9025, 3481, 3364, 9025, 8836] | v.append(p ** 2) | p = 84; v = [5184, 4489, 8464, 9025, 3481, 3364, 9025, 8836, 7056] |
k = ''; t = ['like', 'to', 'play', 'chess'] | t = k.strip().split(' ') | k = ''; t = [''] |
c = {'ive': 0, 'got': 1, 'a': 1, 'lovely': 1, 'bunch': 1, 'of': 1, 'coconuts': 1}; l = 'got' | c[l] -= 1 | c = {'ive': 0, 'got': 0, 'a': 1, 'lovely': 1, 'bunch': 1, 'of': 1, 'coconuts': 1}; l = 'got' |
d = 1; l = 2; m = [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | m[l] = d + 1 | d = 1; l = 2; m = [0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
h = 9; p = 2; r = 3; y = 1 | r = min(h, y + p) | h = 9; p = 2; r = 3; y = 1 |
a = 'HackerRank.com presents "Pythonist 2".'; b = ['h', 'A', 'C', 'K', 'E', 'R', 'r', 'A', 'N', 'K', 'Y', 'T', 'H', 'O', 'N', 'I', 'S', 'T', ' ']; i = 35 | b.append(a[i]) | a = 'HackerRank.com presents "Pythonist 2".'; b = ['h', 'A', 'C', 'K', 'E', 'R', 'r', 'A', 'N', 'K', 'Y', 'T', 'H', 'O', 'N', 'I', 'S', 'T', ' ', '2']; i = 35 |
i = 5; s = '{[()]}'; x = ']' | x = s[i] | i = 5; s = '{[()]}'; x = '}' |
b = 'dowhatwemustbecausewecan'; i = 2; l = ['because', 'can', 'do', 'must', 'we', 'what']; t = 'dowhatwemustbecausewecan'; v = 0 | b = t[v + len(l[i]):] | b = 'whatwemustbecausewecan'; i = 2; l = ['because', 'can', 'do', 'must', 'we', 'what']; t = 'dowhatwemustbecausewecan'; v = 0 |
c = 3 | c -= 1 | c = 2 |
b = 3; o = 2 | m = o * b | b = 3; m = 6; o = 2 |
i = 1; j = 2; k = 0; m = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 2], [0, 2, 1], [1, 0, 0], [1, 0, 2], [1, 1, 1], [1, 1, 2]] | m.append([i, j, k]) | i = 1; j = 2; k = 0; m = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 2], [0, 2, 1], [1, 0, 0], [1, 0, 2], [1, 1, 1], [1, 1, 2], [1, 2, 0]] |
n = 1.0000000000000002e-06 | n /= 10 | n = 1.0000000000000002e-07 |
b = 4; g = [(1, 9), (2, 6), (3, 11)]; n = 3 | g.append((n + 1, b)) | b = 4; g = [(1, 9), (2, 6), (3, 11), (4, 4)]; n = 3 |
b = 11; e = 3; t = 2; y = 2 | b += t * (int(y / e) + 1) | b = 13; e = 3; t = 2; y = 2 |
x = [['+', '-', '+', '+', '+', '+'], ['+', '-', '+', '+', '+', '+'], ['+', '-', '+', '+', '+', '+'], ['+', '+', '-', '-', '+', '+'], ['+', '+', '+', '+', '+', '+'], ['+', '+', '+', '+', '+', '+']] | d = id(x) | d = 139758036676768; x = [['+', '-', '+', '+', '+', '+'], ['+', '-', '+', '+', '+', '+'], ['+', '-', '+', '+', '+', '+'], ['+', '+', '-', '-', '+', '+'], ['+', '+', '+', '+', '+', '+'], ['+', '+', '+', '+', '+', '+']] |
n = 10; s = 'aba' | c = s.count('a') * (n / len(s)) | c = 6.666666666666667; n = 10; s = 'aba' |
b = '2'; m = '3' | b, m = [int(b) - 1, int(m) - 1] | b = 1; m = 2 |
s = 2; v = 11; w = 1 | v += (w + 1) * s | s = 2; v = 15; w = 1 |
i = 1; t = ['I', 'like', 'to', 'dance', 'I']; z = 'like ' | z += t[i + 1].lower() | i = 1; t = ['I', 'like', 'to', 'dance', 'I']; z = 'like to' |
i = 5; o = ['a', 'g']; s = 'abcdefgabcdefg' | o.append(s[i]) | i = 5; o = ['a', 'g', 'f']; s = 'abcdefgabcdefg' |
s = 7; t = [True, True, True, True, True, True, True, False, True, True, True, True, True, False, True, False] | t[s] = True | s = 7; t = [True, True, True, True, True, True, True, True, True, True, True, True, True, False, True, False] |
c = 3; f = [[2, 3]]; l = {(2): [[2, 3]], (3): [[1, 4]], (4): [[4, 4]]} | f = l[c] | c = 3; f = [[1, 4]]; l = {2: [[2, 3]], 3: [[1, 4]], 4: [[4, 4]]} |
a = 2; q = [1, 3] | a = q[0] | a = 1; q = [1, 3] |
a = 128; b = 190; c = 168; k = 0 | k -= bin((a | b) ^ c).count('1') | a = 128; b = 190; c = 168; k = -3 |
a = 2; b = 3; v = {(1): [2], (2): [1]} | v[a].append(b) | a = 2; b = 3; v = {1: [2], 2: [1, 3]} |
a = 63245986; b = 102334155 | a, b = b, a + b | a = 102334155; b = 165580141 |
i = 11; j = 20; x = 27 | x = max(x, i ^ j) | i = 11; j = 20; x = 31 |
c = 1 | c = c + 1 | c = 2 |
c = 9; d = 0; p = 4 | c = d ** 2 + 4 * p | c = 16; d = 0; p = 4 |
c = 1; p = 1 | c += p | c = 2; p = 1 |
d = {(1): True, (2): True}; i = 1 | del d[i] | d = {2: True}; i = 1 |
b = 190; c = 168; l = 190; v = 23 | l ^= (c | b) & v | b = 190; c = 168; l = 168; v = 23 |
a = 48575; t = [0, 1, 3, 7, 15, 31, 63, 127, 255, 4095, 8191, 16383, 32767, 65535, 31071, 62143, 24287, 48575] | a = (1 + t[-1] * 2) % p | a = 1; p = 10; t = [0, 1, 3, 7, 15, 31, 63, 127, 255, 4095, 8191, 16383, 32767, 65535, 31071, 62143, 24287, 48575] |
e = [1, 1, 1, 2, 2]; k = 2 | b = e[k - 1:] | b = [1, 1, 2, 2]; e = [1, 1, 1, 2, 2]; k = 2 |
a = 1134903170; b = 1836311903 | a, b = b, a + b | a = 1836311903; b = 2971215073 |
a = 2; b = 0; m = 1000 | a, b = (a * a - b * b) % m, 2 * a * b % m | a = 4; b = 0; m = 1000 |
a = 'd'; d = {'c': 2, 'd': 1} | d[a] += 1 | a = 'd'; d = {'c': 2, 'd': 2} |
g = 0; j = 0; k = 9; u = 3 | g, u = j, k - j + 1 | g = 0; j = 0; k = 9; u = 10 |
g = ['4', '40']; w = 55 | w = int(g[1]) | g = ['4', '40']; w = 40 |
f = 2; k = 1; m = 9 | m = k + f if k + f < m else m | f = 2; k = 1; m = 3 |
i = 0; s = 'aeiouuoiea'; t = [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] | t[ord(s[i]) - ord('a')] += 1 | i = 0; s = 'aeiouuoiea'; t = [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] |
c = 12; i = 1; s = '99100' | c = int(s[0:i]) | c = 9; i = 1; s = '99100' |
i = 1; l = 1; r = 2; v = [(1, 2), (-2, -2), (-2, -2)] | l, r = v[i] | i = 1; l = -2; r = -2; v = [(1, 2), (-2, -2), (-2, -2)] |
j = 0 | s.append(j) | j = 0; s = [0] |
d = 3; t = 1 | s.append(t + d) | d = 3; s = [4]; t = 1 |
d = [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]; x = 3 | d[x] += 1 | d = [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]; x = 3 |
j = 'abb'; o = ['b'] | j = ''.join(o) | j = 'b'; o = ['b'] |
a = [0, 0, 1, 0, 1, 0, 1, 1]; i = 2 | a[i] = 0 | a = [0, 0, 0, 0, 1, 0, 1, 1]; i = 2 |
r = 7.450580596923828e-08 | r /= 2 | r = 3.725290298461914e-08 |
d = {(7): 0, (1): 1, (3): 2}; q = 4; r = 3 | d[q] = r | d = {7: 0, 1: 1, 3: 2, 4: 3}; q = 4; r = 3 |
c = [1, 3, 5, 7, 9]; j = 0 | q = c[j] | c = [1, 3, 5, 7, 9]; j = 0; q = 1 |
d = 99; w = 0 | l = [(0) for i in range(w, d + 1)] | d = 99; l = [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, 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, 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, 0, 0, 0, 0]; w = 0 |
b = [(2, 1)]; i = 1; j = 1 | b.append((i - 1, j)) | b = [(2, 1), (0, 1)]; i = 1; j = 1 |
i = 4; p = [6, 5, 8, 4, 7, 10, 9]; t = [8] | t += [p[i]] | i = 4; p = [6, 5, 8, 4, 7, 10, 9]; t = [8, 7] |
q = 4 | s[q] = 1 | q = 4; s = {4: 1} |
u = ['YES', 'NO'] | u.append('YES') | u = ['YES', 'NO', 'YES'] |
j = 1; m = [2, 2]; p = 1 | m[j] = p | j = 1; m = [2, 1]; p = 1 |
i = 2; j = 7; q = ['i', 'if', 'ifa', 'ifai', 'ifail', 'ifailu', 'ifailuh', 'failuhkqq', 'a', 'ai', 'ail', 'ailu', 'ailuh']; r = 'ifailuhkqq' | q.append(r[i:j + 1]) | i = 2; j = 7; q = ['i', 'if', 'ifa', 'ifai', 'ifail', 'ifailu', 'ifailuh', 'failuhkqq', 'a', 'ai', 'ail', 'ailu', 'ailuh', 'ailuhk']; r = 'ifailuhkqq' |
e = 4; i = 6 | e = i - 1 | e = 5; i = 6 |
i = 1; u = [2, 3] | r[i] = u[1] | i = 1; r = {1: 3}; u = [2, 3] |
n = 1; r = deque([(2, 2)]); u = 2 | u, n = r.popleft() | n = 2; r = deque([]); u = 2 |
s = [4, 2, 3, 4] | s = s[1:] | s = [2, 3, 4] |
y = 9 | y += 1 | y = 10 |
a = [2, 1]; b = [5, 3, 4]; n = 1; p = [2, 1] | a, b = p[:n], p[n:] | a = [2]; b = [1]; n = 1; p = [2, 1] |
d = 9; m = [0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0] | m[d] += 1 | d = 9; m = [0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0] |
a = [-1, 1, 2, 3, 4, 5] | a.pop() | a = [-1, 1, 2, 3, 4] |
i = 4; j = 1; v = [0, 0, 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] | v[i] = j | i = 4; j = 1; v = [0, 0, 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] |
i = 2; j = [1, 1, 1, 1, 2, 1, 2, 1, 1] | j[i] = j[i + 1] + 1 | i = 2; j = [1, 1, 2, 1, 2, 1, 2, 1, 1] |
e = [1, 2, 3, 3]; g = [0, 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]; i = 2 | g[e[i]] += 1 | e = [1, 2, 3, 3]; g = [0, 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]; i = 2 |
i = 2; j = 3; m = 'ix#'; s = [['T', 's', 'i'], ['h', '%', 'x'], ['i', ' ', '#'], ['$', 'a', ' '], [ '#', 't', '%'], ['i', 'r', '!']] | m += s[j][i] | i = 2; j = 3; m = 'ix# '; s = [['T', 's', 'i'], ['h', '%', 'x'], ['i', ' ', '#'], ['$', 'a', ' '], ['#', 't', '%'], ['i', 'r', '!']] |
i = 5; l = [3, 4, 5, 6, 7, 2]; v = 6 | v = l[i] | i = 5; l = [3, 4, 5, 6, 7, 2]; v = 2 |
n = 5; t = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; v = 4 | m = '-'.join(t[v + 1:n]) | m = ''; n = 5; t = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; v = 4 |
f = '1'; m = '01000000' | m = m + f | f = '1'; m = '010000001' |
d = 3; i = 0; n = [5, 3, 2] | d = n[i] | d = 5; i = 0; n = [5, 3, 2] |
v = '0 1 2 2\n' | v = v.strip('\n') | v = '0 1 2 2' |
i = 1; s = 'i #'; x = [['T', 'h', 'i'], ['s', '%'], ['i', 'x']] | x[i] += s[i] | i = 1; s = 'i #'; x = [['T', 'h', 'i'], ['s', '%', ' '], ['i', 'x']] |
e = 2 | e >>= 1 | e = 1 |
s = 1 | s = s + 1 | s = 2 |
e = 'abc'; j = [''] | j.append(e) | e = 'abc'; j = ['', 'abc'] |
b = 10; n = 11; y = 0 | y = n - b | b = 10; n = 11; y = 1 |
b = [1, 2, 1, 2, 1, 2, 3, 4, 0, 0]; i = 10 | b[i - 1] = 1 | b = [1, 2, 1, 2, 1, 2, 3, 4, 0, 1]; i = 10 |
n = 3 | n += 1 | n = 4 |
a = 2; b = 10; i = 67; y = 1475739525896764129400 | y += a ^ b << i | a = 2; b = 10; i = 67; y = 2951479051793528258682 |
d = '{'; j = [] | j.append(d) | d = '{'; j = ['{'] |
p = 'c',; t = ['dummy', [('a',), ('b',)], [('a', 'b'), ('b', 'c')], [('a', 'b', 'c'), ('b', 'c', 'd')], [('a', 'b', 'c', 'd')]]; v = [('a', 'b', 'c'), ('b', 'c', 'd')] | v = t[len(p)] | p = ('c',); t = ['dummy', [('a',), ('b',)], [('a', 'b'), ('b', 'c')], [('a', 'b', 'c'), ('b', 'c', 'd')], [('a', 'b', 'c', 'd')]]; v = [('a',), ('b',)] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.