start
stringlengths
5
368
code
stringlengths
5
143
end
stringlengths
5
527
u = 6
u -= 1
u = 5
l = 5; u = [None, 2, 4]
u.append(l)
l = 5; u = [None, 2, 4, 5]
n = 1.0000000000000005e-82
n /= 10
n = 1.0000000000000006e-83
i = 5; k = ['l', 'u']; l = 2; s = 'ifailuhkqq'
k = sorted(s[i:i + l])
i = 5; k = ['h', 'u']; l = 2; s = 'ifailuhkqq'
b = 0.00341796875
b /= 2
b = 0.001708984375
a = 0; h = [{1}, set(), set()]; z = 1
h[z].add(a)
a = 0; h = [{1}, {0}, set()]; z = 1
l = 'x'; r = ['x', 'z']
r.remove(l)
l = 'x'; r = ['z']
i = 1; l = [[1.0, 0], [0, 0], [0, 0]]
l[i][0] = i * (i + 1) / 2 + 1
i = 1; l = [[1.0, 0], [2.0, 0], [0, 0]]
m = ['abc', '', 'xy']
m.pop()
m = ['abc', '']
c = [6, 5, 3, 2]; i = 1; j = 0; s = 6; w = 6
w = s + c[i] * j
c = [6, 5, 3, 2]; i = 1; j = 0; s = 6; w = 6
i = [1, 2, 3, 4]; k = ['2', '-1', '2', '3', '4', '-5']
i = [int(a) for a in k]
i = [2, -1, 2, 3, 4, -5]; k = ['2', '-1', '2', '3', '4', '-5']
o = 5; t = 8
o = t
o = 8; t = 8
b = 'world'
h = set(b)
b = 'world'; h = {'l', 'r', 'd', 'o', 'w'}
g = 1.0; n = 3
g += n * (n - 1) / 2
g = 4.0; n = 3
a = [[1, 2, 3, -1, -2], [-5, -8, -1, 2, -150], [1, 2, 3, -250, 100], [1, 1, 1, 1, 20]]; i = 3; j = 4; x = 4
x += a[i][j]
a = [[1, 2, 3, -1, -2], [-5, -8, -1, 2, -150], [1, 2, 3, -250, 100], [1, 1, 1, 1, 20]]; i = 3; j = 4; x = 24
b = [3]; p = 3
b.remove(p)
b = []; p = 3
v = '11111111111111111'
v += '1'
v = '111111111111111111'
i = 0; j = 4; p = [1, 2, 2, 2, 2, 1]; q = [1, 2, 2, 2]
q = p[i:j + 1]
i = 0; j = 4; p = [1, 2, 2, 2, 2, 1]; q = [1, 2, 2, 2, 2]
l = [-20, -3916237, -357920, -3620601, 7374819, -7330761, 30, 6246457, - 6461594, 266854]
l.sort()
l = [-7330761, -6461594, -3916237, -3620601, -357920, -20, 30, 266854, 6246457, 7374819]
a = 1; b = 2; d = 4; i = 2; j = 5
i, j = a + (j - b), b + (d - (i - a))
a = 1; b = 2; d = 4; i = 4; j = 5
f = 6, 2; g = [(9, 1)]
g.append(f)
f = (6, 2); g = [(9, 1), (6, 2)]
b = [0, 1, 0, 0, 0, 0, 0, 0]; i = 6
b[i] = 1
b = [0, 1, 0, 0, 0, 0, 1, 0]; i = 6
i = 4; u = [1, 1, 2, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
u[i] = i * u[i - 1] % p
i = 4; p = 28; u = [1, 1, 2, 6, 24, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
i = 3; o = 'hae and via '; s = 'haveaniceday'
o += s[i]
i = 3; o = 'hae and via e'; s = 'haveaniceday'
f = {'5', '2', '1', '4', '3'}; u = {'12', '5', '9', '45', '78', '23', '2', '8', '11', '1', '4', '10', '3', '84', '6', '7'}
x.add(bool(u - f) and f.issubset(u))
f = {'3', '2', '5', '1', '4'}; u = {'45', '12', '10', '6', '11', '7', '78', '3', '84', '23', '2', '8', '9', '5', '1', '4'}; x = {True}
n = 10; s = 'aba'
q = s.count('a') * (n // len(s))
n = 10; q = 6; s = 'aba'
c = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; h = 3; y = 'e'
h = c.index(y)
c = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; h = 4; y = 'e'
l = 1.0; w = 8.0
w *= i / l
i = -5; l = 1.0; w = -40.0
f = {(0): ['-', '-'], (6): ['-']}; s = '-'; x = 6
f[x].append(s)
f = {0: ['-', '-'], 6: ['-', '-']}; s = '-'; x = 6
g = 'a'; l = {'a': 1, 'b': 2}
l[g] += 1
g = 'a'; l = {'a': 2, 'b': 2}
c = 403291461126605635584000000; k = 27
c *= k
c = 10888869450418352160768000000; k = 27
i = 1; j = 0; n = [[(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5)]]
n[0].append((i, j))
i = 1; j = 0; n = [[(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 0)]]
k = 1.200000000000001e-69
k /= 10
k = 1.200000000000001e-70
i = 1; j = 4; m = 5
m = abs(i - j)
i = 1; j = 4; m = 3
l = [2, 3, 6, 6, 5]
m = l[0]
l = [2, 3, 6, 6, 5]; m = 2
i = 0; j = 1; k = 4; l = [3, 3, 1, 1, 1]; x = [(3, 3, 1), (3, 3, 1)]
x.append((l[i], l[j], l[k]))
i = 0; j = 1; k = 4; l = [3, 3, 1, 1, 1]; x = [(3, 3, 1), (3, 3, 1), (3, 3, 1)]
h = [0, 0, 1, 2, 2, 2, 1, 0]; j = 4; w = 1
h[j] = h[j] - w
h = [0, 0, 1, 2, 1, 2, 1, 0]; j = 4; w = 1
i = 3; r = [['4'], ['2'], ['8'], ['36'], ['900'], [], [], []]; w = [2, 8]
w.append(int(r[i][0]))
i = 3; r = [['4'], ['2'], ['8'], ['36'], ['900'], [], [], []]; w = [2, 8, 36]
m = 3; r = [3, 2, 1, 3, 2, 3]
r.append(m)
m = 3; r = [3, 2, 1, 3, 2, 3, 3]
h = {'i love to': 1, 'love to dance': 1, 'i like to': 0}; z = 'i like to'
h[z] += 1
h = {'i love to': 1, 'love to dance': 1, 'i like to': 1}; z = 'i like to'
i = 3; j = 4; q = 12; x = [[[-1, -1], [-1, 0], [-1, 1], [-1, 2], [-1, 3]], [[0, -1], [-1, -1], [0, -1], [-1, -1], [0, -1]], [[1, -1], [-1, 0], [1, 1], [-1, 2], [1, 3]], [ [2, -1], [0, 0], [2, 1], [0, 2], [2, 3]]]
q = max(q, (x[i][j][0] + 1) * 2 + (x[i][j][1] + 1) * 2)
i = 3; j = 4; q = 14; x = [[[-1, -1], [-1, 0], [-1, 1], [-1, 2], [-1, 3]], [[0, -1], [-1, -1], [0, -1], [-1, -1], [0, -1]], [[1, -1], [-1, 0], [1, 1], [-1, 2], [1, 3]], [[2, -1], [0, 0], [2, 1], [0, 2], [2, 3]]]
a = 2; g = 100
z += g - a
a = 2; g = 100; z = 49
c = '6'; t = '4'
t, c = [int(t), int(c)]
c = 6; t = 4
w = ['4', '3', '2', '1']; x = ['4', '3', '2', '1']
x.append(w)
w = ['4', '3', '2', '1']; x = ['4', '3', '2', '1', ['4', '3', '2', '1']]
c = 4; i = 0; p = 'bbxx'; v = 'xaxb'
c += abs(v.count(chr(97 + i)) - p.count(chr(97 + i)))
c = 5; i = 0; p = 'bbxx'; v = 'xaxb'
i = 1; x = [1, 2, 0]
x.append(i)
i = 1; x = [1, 2, 0, 1]
v = 12; w = 155; y = 12
v = y - w
v = -143; w = 155; y = 12
n = {(2): True}; y = 2
del n[y]
n = {}; y = 2
c = [-7330761, -6461594, -3916237, -3620601, -357920, -20, 30, 266854, 6246457, 7374819]; d = [(-6461594, -7330761), (-6461594, -7330761), (-3916237, -6461594)]; i = -3916237; q = 2
d.append((c[q + 1], i))
c = [-7330761, -6461594, -3916237, -3620601, -357920, -20, 30, 266854, 6246457, 7374819]; d = [(-6461594, -7330761), (-6461594, -7330761), (-3916237, -6461594), (-3620601, -3916237)]; i = -3916237; q = 2
i = 1; l = [0, 0, 0, 0, 0, 0, 0, 0, 0]
l[i] += 1
i = 1; l = [0, 1, 0, 0, 0, 0, 0, 0, 0]
i = 1; s = 'HackerRank.com presents "Pythonist 2".'; y = 'h'
y += s[i].upper()
i = 1; s = 'HackerRank.com presents "Pythonist 2".'; y = 'hA'
h = 4; k = 4; m = [-1, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, -1, 0, -1, -1, -1, -1, - 1, 0, -1, -1, -1, -1, -1]; z = [[0, 9], [], [], [], [1, 8], [], [], [], [2, 7], [], [], [], [], [], [4, 5], [], [], [], [], []]
h = max(h, z[k][m[k]])
h = 4; k = 4; m = [-1, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1]; z = [[0, 9], [], [], [], [1, 8], [], [], [], [2, 7], [], [], [], [], [], [4, 5], [], [], [], [], []]
b = ['1112', '1912', '1892', '1234']; k = '1112'; u = 1
k = b[u]
b = ['1112', '1912', '1892', '1234']; k = '1912'; u = 1
i = ['cab ', 'bcab ', 'ccccc']; k = 2; x = 'bcab '
x = str(i[k])
i = ['cab ', 'bcab ', 'ccccc']; k = 2; x = 'ccccc'
b = 6; j = 2
b += j
b = 8; j = 2
n = 1.000000000000001e-112
n /= 10
n = 1.000000000000001e-113
f = '1'; j = 32
j = len(f)
f = '1'; j = 1
i = 3; t = 5; u = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; w = ['o', 'k', 'f', 'd', 'l', 'e', '-', 'O', 'u', 't', 'z']
w[i] = u[t]
i = 3; t = 5; u = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; w = ['o', 'k', 'f', 'f', 'l', 'e', '-', 'O', 'u', 't', 'z']
e = 4; q = 0; w = 3
w, q = e, q + 1
e = 4; q = 1; w = 4
c = 0; z = 0
c, z = 0, 0
c = 0; z = 0
k = [[None, 1, None, None, None, None], [1, None, 1, None, None, None], [ None, 1, None, 1, None, None], [None, None, 1, None, 1, None], [None, None, None, None, None, None], [None, None, None, None, None, None]]; u = 3; v = 4; w = 1
k[v][u] = w
k = [[None, 1, None, None, None, None], [1, None, 1, None, None, None], [None, 1, None, 1, None, None], [None, None, 1, None, 1, None], [None, None, None, 1, None, None], [None, None, None, None, None, None]]; u = 3; v = 4; w = 1
g = 9
g = g // 10
g = 0
y = 3; z = 1
z = y
y = 3; z = 3
d = 123; i = 7
d = d ^ 1 << i
d = 251; i = 7
j = 3; k = 3; s = ['l', 'm', 'n', 'o']
s[k] = s[j - 1]
j = 3; k = 3; s = ['l', 'm', 'n', 'n']
a = {'a': 2, 'b': 2, 'c': 1, 'd': 1, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0, 'j': 0, 'k': 0, 'l': 0}; i = 109; x = 'aabbcd'
a[chr(i)] = x.count(chr(i))
a = {'a': 2, 'b': 2, 'c': 1, 'd': 1, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0, 'j': 0, 'k': 0, 'l': 0, 'm': 0}; i = 109; x = 'aabbcd'
f = [[112, 42, 83, 119], [56, 125, 56, 49], [15, 78, 101, 43], [62, 98, 114, 108]]; i = 0; j = 1; s = 119; v = 4
s += max(f[i][j], f[v - i - 1][j], f[i][v - j - 1], f[v - i - 1][v - j - 1])
f = [[112, 42, 83, 119], [56, 125, 56, 49], [15, 78, 101, 43], [62, 98, 114, 108]]; i = 0; j = 1; s = 233; v = 4
e = '\n'; z = [[1], [5], [-2, -3, -1, -4, -6], [], []]
z.append([int(x) for x in e.split()])
e = '\n'; z = [[1], [5], [-2, -3, -1, -4, -6], [], [], []]
j = ['pop']; o = 'reverse'
j = o.rstrip().split(' ')
j = ['reverse']; o = 'reverse'
d = [0, 0, 2, 4, 4, 0]; w = [[1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0]]
w.append(d)
d = [0, 0, 2, 4, 4, 0]; w = [[1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 2, 4, 4, 0]]
e = 1
k = 'val_{}'.format(e)
e = 1; k = 'val_1'
c = ['a', 'b', 'c', 'a', 'b', 'c', 'd', 'bcabc', 'cabcd', 'abcdd', 'bcddd', 'abcabc', 'bcabcd', 'cabcdd']; i = 6; j = 3; t = 'abcabcddd'
c.append(t[j:j + i])
c = ['a', 'b', 'c', 'a', 'b', 'c', 'd', 'bcabc', 'cabcd', 'abcdd', 'bcddd', 'abcabc', 'bcabcd', 'cabcdd', 'abcddd']; i = 6; j = 3; t = 'abcabcddd'
a = 2; d = [0, 2, 3]
a = sum(d)
a = 5; d = [0, 2, 3]
i = 0; x = 'aaabccddd'
x = x[:i] + x[i + 2:]
i = 0; x = 'abccddd'
u = [[], [], []]
u.append([])
u = [[], [], [], []]
k = 1; p = [2, 2]
p.append(k)
k = 1; p = [2, 2, 1]
i = 0; j = 3; o = 4; w = [[1, 3, 4], [2, 2, 3], [1, 2, 4]]
o = o + w[j - 1][i]
i = 0; j = 3; o = 5; w = [[1, 3, 4], [2, 2, 3], [1, 2, 4]]
c = 'cdcd'; i = 2; j = 3; s = ['c', 'd']
s = ''.join(sorted(c[j - i:j]))
c = 'cdcd'; i = 2; j = 3; s = 'cd'
n = 0.0001220703125
n /= 2
n = 6.103515625e-05
b = OrderedDict([('BANANA FRIES', 12), ('POTATO CHIPS', 30), ('APPLE JUICE', 20), ('CANDY', 5)]); h = 'CANDY'; q = 5
b[h] = b.get(h, 0) + int(q)
b = OrderedDict([('BANANA FRIES', 12), ('POTATO CHIPS', 30), ('APPLE JUICE', 20), ('CANDY', 10)]); h = 'CANDY'; q = 5
i = [2, 1]; j = 1; k = 7
k = i[0] + j
i = [2, 1]; j = 1; k = 3
i = 2; j = 4; s = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, 1, 2, 0, 0, 0], [0, 1, 2, 0, 0, 0]]
s[i][j] = s[i - 1][j - 1] + 1
i = 2; j = 4; s = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 2, 0], [0, 1, 1, 0, 0, 0], [0, 1, 2, 0, 0, 0], [0, 1, 2, 0, 0, 0]]
b = [1, 2, 3, 4]; q = ['1', '1', '1']; x = 3
q.append('1') if b[x] > 0 else q.append('0')
b = [1, 2, 3, 4]; q = ['1', '1', '1', '1']; x = 3
g = [10, 4, 1, 2, 3, 4, 10]; x = '20\n'
g.append(int(x))
g = [10, 4, 1, 2, 3, 4, 10, 20]; x = '20\n'
d = 2; n = """1112\n1X12\n18X2\n1"""
n += str(d)
d = 2; n = '1112\n1X12\n18X2\n12'
h = 27; i = 4; l = 27; v = [10, 1, 10, 1, 10]
l, h = max(h + v[i - 1] - 1, l), max(l + v[i] - 1, h + abs(v[i] - v[i - 1]))
h = 36; i = 4; l = 27; v = [10, 1, 10, 1, 10]
k = {'a': 1, 'b': 1, 'c': 1, 'd': 1, 'ab': 1, 'bc': 1, 'cd': 1}; s = 'abc'
k[s] = k.get(s, 0) + 1
k = {'a': 1, 'b': 1, 'c': 1, 'd': 1, 'ab': 1, 'bc': 1, 'cd': 1, 'abc': 1}; s = 'abc'
b = [1, 2, 2, 3, 3, 4]; i = 1
s = b[i]
b = [1, 2, 2, 3, 3, 4]; i = 1; s = 2
a = 365435296162; b = 591286729879
a, b = b, a + b
a = 591286729879; b = 956722026041
l = ['a', 'b']
h = len(l)
h = 2; l = ['a', 'b']
q = [2, 4, 5, 9]
l = set(q)
l = {9, 2, 4, 5}; q = [2, 4, 5, 9]
i = 1; n = 5; z = [0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
m = z[n:n - i:-1] + z[n - i + 2:n + 1]
i = 1; m = ['e']; n = 5; z = [0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
a = 22; i = 4; j = 6; s = '2222222'
a = s[i:j + 1]
a = '222'; i = 4; j = 6; s = '2222222'
k = 3; n = 4
n += k
k = 3; n = 7
f = []; x = 14
f.append(x)
f = [14]; x = 14
b = '11111111111111100001110110111'
b = b + '1'
b = '111111111111111000011101101111'
i = 11; x = {(0): 0, (1): 0, (2): 0, (3): 0, (4): 0, (5): 0, (6): 0, (7): 0, (8): 0, (9): 0, (10): 0}
x[i] = 0
i = 11; x = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0}
a = [1, 3, 4, 0]; s = [0, 0, 0, 0]
s = a
a = [1, 3, 4, 0]; s = [1, 3, 4, 0]
c = -1; f = 2; p = 1; r = -2
r, c = f + r, p + c
c = 0; f = 2; p = 1; r = 0
w = [6, 0, 0, 1, 2, 0, 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]; x = 1
w[x] += 1
w = [6, 1, 0, 1, 2, 0, 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]; x = 1