start
stringlengths 5
368
| code
stringlengths 5
143
| end
stringlengths 5
527
|
---|---|---|
l = [1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1]; x = 1; y = 3
|
l.append(abs(x - y))
|
l = [1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2]; x = 1; y = 3
|
i = [5, 4, 4, 2, 2]; s = [5, 4, 4, 2, 2]; x = '8'
|
s.append(int(x))
|
i = [5, 4, 4, 2, 2]; s = [5, 4, 4, 2, 2, 8]; x = '8'
|
a = 4; s = '2 4 '
|
s += str(a) + ' '
|
a = 4; s = '2 4 4 '
|
c = 9; f = [2, 4, 5, 6, 7, 9, 11, 12]; k = 2; n = 7
|
c = f[n] + k
|
c = 14; f = [2, 4, 5, 6, 7, 9, 11, 12]; k = 2; n = 7
|
i = 1
|
u.append(i)
|
i = 1; u = [1]
|
a = 8; n = 3.0
|
n = (a - 1) / 2
|
a = 8; n = 3.5
|
b = [1, 2, 3, 4, 6, 3]
|
l = max(b)
|
b = [1, 2, 3, 4, 6, 3]; l = 6
|
o = 4; y = [2, 1]
|
y.append(o)
|
o = 4; y = [2, 1, 4]
|
p = [['.', 'X', '.', '.', '.', 'X']]; r = ['.', 'X', '*', '.', 'X', '.', 'X', 'X', 'X', '.', 'X']
|
p.append(r)
|
p = [['.', 'X', '.', '.', '.', 'X'], ['.', 'X', '*', '.', 'X', '.', 'X', 'X', 'X', '.', 'X']]; r = ['.', 'X', '*', '.', 'X', '.', 'X', 'X', 'X', '.', 'X']
|
c = 3; i = 2; w = [1, 2, 3]
|
c += w[i]
|
c = 6; i = 2; w = [1, 2, 3]
|
b = 'bc'; d = 2; l = 2; s = 'abcd'
|
b = s[d:d + l]
|
b = 'cd'; d = 2; l = 2; s = 'abcd'
|
g = {(1): 1, (2): 1}; v = 3
|
g[v] = g.get(v, 0) + 1
|
g = {1: 1, 2: 1, 3: 1}; v = 3
|
d = 5; i = 4; k = 1
|
k = min(i // 2, (d - 1) // 2)
|
d = 5; i = 4; k = 2
|
k = 4; p = 4; y = 'do'
|
k = p + len(y)
|
k = 6; p = 4; y = 'do'
|
i = 11; l = 7; s = '7891011'
|
i = (0, l)[s[0] == '0']
|
i = 0; l = 7; s = '7891011'
|
n = 4; o = {1, 2, 3}
|
o.add(n)
|
n = 4; o = {1, 2, 3, 4}
|
s = 'kkkkkkz'; z = 2
|
z = len(s)
|
s = 'kkkkkkz'; z = 7
|
k = 3
|
k = k + 1
|
k = 4
|
c = 'C',; f = ['A']
|
f.append(''.join(c))
|
c = ('C',); f = ['A', 'C']
|
p = 4; q = 4; w = [0, 1, 2, 3, 6, 5, 4]
|
w[q] = p
|
p = 4; q = 4; w = [0, 1, 2, 3, 4, 5, 4]
|
h = []; l = 1; z = {(1): [2, 3], (2): [1, 3], (3): [1, 2]}
|
h.extend(z[l])
|
h = [2, 3]; l = 1; z = {1: [2, 3], 2: [1, 3], 3: [1, 2]}
|
k = ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '1', '1']
|
k.append('1')
|
k = ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '1', '1', '1']
|
j = {'BWB': 4, 'WBW': 2}; n = 'WB'; s = 3
|
j[n] = s
|
j = {'BWB': 4, 'WBW': 2, 'WB': 3}; n = 'WB'; s = 3
|
i = ['e', 'd', 'c']; j = 4; n = ['e', 'd', 'c', 'b', 'a']; y = 4
|
i.append(n[y - abs(j - y) - 1])
|
i = ['e', 'd', 'c', 'b']; j = 4; n = ['e', 'd', 'c', 'b', 'a']; y = 4
|
o = 4
|
o += 2
|
o = 6
|
i = 1; j = 2; r = [102]; s = 'ifailuhkqq'
|
r = [ord(x) for x in s[i:i + j]]
|
i = 1; j = 2; r = [102, 97]; s = 'ifailuhkqq'
|
c = 3; u = [1, 2]
|
u.append(c)
|
c = 3; u = [1, 2, 3]
|
s = [1, 1, 2]; v = 3
|
s.append(v)
|
s = [1, 1, 2, 3]; v = 3
|
a = ['a', 'b', 'c', 'd']; f = 'abcd'; j = 1; k = 1
|
a = list(f[j:k + 1])
|
a = ['b']; f = 'abcd'; j = 1; k = 1
|
a = '2'; g = {'1'}
|
g.add(a)
|
a = '2'; g = {'1', '2'}
|
d = '9'; y = '98'
|
y = d
|
d = '9'; y = '9'
|
j = 2; u = 1; y = [1, 2, 2, 2, 1]
|
y[j] -= u
|
j = 2; u = 1; y = [1, 2, 1, 2, 1]
|
m = [2, 3]; y = [[1, 2, 3]]
|
y.append(m)
|
m = [2, 3]; y = [[1, 2, 3], [2, 3]]
|
b = ['3', '3\n']; m = '4 7\n'
|
b = m.split(' ')
|
b = ['4', '7\n']; m = '4 7\n'
|
a = ['e', 'd', 'c', 'b', 'a']; j = 7; p = ['e', 'd', 'c', 'b', 'c', 'd']; z = 4
|
p.append(a[z - abs(j - z) - 1])
|
a = ['e', 'd', 'c', 'b', 'a']; j = 7; p = ['e', 'd', 'c', 'b', 'c', 'd', 'e']; z = 4
|
c = 3
|
o = (c - 1) * 2
|
c = 3; o = 4
|
m = 1
|
d.append(m)
|
d = [1]; m = 1
|
i = 2; j = [110]; k = 110; l = [20, 30, 10]; s = 60
|
j += [k + s - len(l) * l[i]]
|
i = 2; j = [110, 140]; k = 110; l = [20, 30, 10]; s = 60
|
g = {9, 5}; i = """4\n2 4 5 9\n4\n2 4 11 12\n\n\n\n"""; o = {11, 12}
|
i = g.union(o)
|
g = {9, 5}; i = {9, 11, 12, 5}; o = {11, 12}
|
y = [1, 3, 2]
|
c = list(reversed(sorted(y)))
|
c = [3, 2, 1]; y = [1, 3, 2]
|
k = 6
|
g.append(k)
|
g = [6]; k = 6
|
c = 6
|
c = c | c >> 1
|
c = 7
|
i = 102334155; q = 165580141
|
i = q
|
i = 165580141; q = 165580141
|
d = 'what'; r = 22
|
r = r - len(d)
|
d = 'what'; r = 18
|
p = '111111111111111000011101101111'
|
p = p + '1'
|
p = '1111111111111110000111011011111'
|
i = 'B'; u = {'A': 2}
|
u[i] = 1
|
i = 'B'; u = {'A': 2, 'B': 1}
|
h = 55; j = 89
|
h = j
|
h = 89; j = 89
|
b = 4; i = 18; u = [0, 1, 2, 1, 0, 3, 0, 3, 0, 1, 4, 1, 0, 1, 4, 1, 0, 3]; v = 17; x = 20
|
b = min(u[2 * v - i], x - i)
|
b = 0; i = 18; u = [0, 1, 2, 1, 0, 3, 0, 3, 0, 1, 4, 1, 0, 1, 4, 1, 0, 3]; v = 17; x = 20
|
r = 3.3881317890172014e-20
|
r /= 2
|
r = 1.6940658945086007e-20
|
p = 1.200000000000001e-65
|
p = p / 10
|
p = 1.200000000000001e-66
|
a = 2; b = 10; i = 70; u = 11805916207174113034366
|
u += a ^ b << i
|
a = 2; b = 10; i = 70; u = 23611832414348226068608
|
a = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]; j = 4
|
j = len(a)
|
a = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]; j = 4
|
k = 6; x = 3
|
k = x * 3
|
k = 9; x = 3
|
a = [1, 2, 2, 1]
|
a.sort()
|
a = [1, 1, 2, 2]
|
c = 0; h = 'hae '; i = [['h', 'a', 'e'], ['a', 'n', 'd'], ['v', 'i', 'a'], ['e', 'c', 'y']]; r = 1
|
h = h + i[r][c]
|
c = 0; h = 'hae a'; i = [['h', 'a', 'e'], ['a', 'n', 'd'], ['v', 'i', 'a'], ['e', 'c', 'y']]; r = 1
|
g = [100, 0, -100, 0, 0, 0]; i = 2; k = 100
|
g[i - 1] = g[i - 1] + k
|
g = [100, 100, -100, 0, 0, 0]; i = 2; k = 100
|
e = -3; f = 1; k = 2
|
e += f * k
|
e = -1; f = 1; k = 2
|
i = 0; m = 1
|
b = i + m - 1
|
b = 0; i = 0; m = 1
|
a = ['b', 'b']; f = ['a', 'b']
|
f = sorted(a)
|
a = ['b', 'b']; f = ['b', 'b']
|
i = 12; x = [0, 1, 5, 14, 30, 55, 91, 140, 204, 285, 385, 506]
|
x.append(x[i - 1] + i * i)
|
i = 12; x = [0, 1, 5, 14, 30, 55, 91, 140, 204, 285, 385, 506, 650]
|
i = 2; p = 3; q = [10, 20, 30, 100, 200, 300, 1000]; y = 330
|
y = y - q[i] + q[i + p]
|
i = 2; p = 3; q = [10, 20, 30, 100, 200, 300, 1000]; y = 600
|
p = 'c'
|
p = list(p)
|
p = ['c']
|
j = 7; p = [5, 5, 7]; w = 0
|
w = p.index(j)
|
j = 7; p = [5, 5, 7]; w = 2
|
d = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0}; i = 'f'
|
d[i] = 0
|
d = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0}; i = 'f'
|
c = 100; j = 2; k = 5; s = 200
|
s = s + (k - j + 1) * c
|
c = 100; j = 2; k = 5; s = 600
|
k = 'CANDY'; l = ['POTATO', 'CHIPS', '30']
|
k = ' '.join(l[:-1])
|
k = 'POTATO CHIPS'; l = ['POTATO', 'CHIPS', '30']
|
c = 'of'; d = {'ive': 1, 'got': 1, 'a': 1, 'lovely': 1, 'bunch': 1}
|
d[c] = d[c] + 1 if c in d else 1
|
c = 'of'; d = {'ive': 1, 'got': 1, 'a': 1, 'lovely': 1, 'bunch': 1, 'of': 1}
|
s = 1
|
r = s - 1
|
r = 0; s = 1
|
n = {'X': 2, '_': 3, 'Y': 1}; x = 1
|
x = n.get('_', 0)
|
n = {'X': 2, '_': 3, 'Y': 1}; x = 3
|
g = ['IMNO']; p = 0
|
p = sum(map(len, g))
|
g = ['IMNO']; p = <map object at 0x7f1c77aef310>
|
c = [0, 1, 2, 4, 6, 5, 3]
|
j = int(len(c) / 2)
|
c = [0, 1, 2, 4, 6, 5, 3]; j = 3
|
a = 'ab'; i = 3; j = 4; s = 'abba'
|
a = ''.join(sorted(s[i:j]))
|
a = 'a'; i = 3; j = 4; s = 'abba'
|
i = 29; p = 'hACKERrANK.COM PRESENTS "pYTH'; s = 'HackerRank.com presents "Pythonist 2".'
|
p = p + s[i].upper()
|
i = 29; p = 'hACKERrANK.COM PRESENTS "pYTHO'; s = 'HackerRank.com presents "Pythonist 2".'
|
k = 1; x = 8
|
x = k % 10
|
k = 1; x = 1
|
e = [98, 74, 12]; i = 2; k = 98
|
k ^= e[i]
|
e = [98, 74, 12]; i = 2; k = 110
|
m = 0; u = [1, 4]
|
m = u.pop(0)
|
m = 1; u = [4]
|
i = 2; s = 3; w = 5
|
s = i - w
|
i = 2; s = -3; w = 5
|
c = [3, 4]; l = [3]
|
c.remove(l[0])
|
c = [4]; l = [3]
|
e = [2]; z = 0
|
e.append(z)
|
e = [2, 0]; z = 0
|
a = 1; b = 2; k = 100
|
c += (b - a + 1) * k
|
a = 1; b = 2; c = 142; k = 100
|
i = 3; m = [True, True, True, False, False, False]
|
m[i] = True
|
i = 3; m = [True, True, True, True, False, False]
|
j = [1, 1, 2, 3, 4]
|
a = sum(j)
|
a = 11; j = [1, 1, 2, 3, 4]
|
b = ['5', '6']
|
b = list(map(float, b))
|
b = [5.0, 6.0]
|
j = 0; u = [2, 1, 2, 0]
|
u[j] += 1
|
j = 0; u = [3, 1, 2, 0]
|
k = 2; q = 1; r = 1
|
q, r = divmod(q + r, k)
|
k = 2; q = 1; r = 0
|
v = 12
|
v += 1
|
v = 13
|
b = ['A', 'A', 'B', 'B', 'C', '_', 'C']; f = ['A', 'A', 'B', 'B', 'C']; i = 'C'
|
f = [i for i in b if i.isalpha()]
|
b = ['A', 'A', 'B', 'B', 'C', '_', 'C']; f = ['A', 'A', 'B', 'B', 'C', 'C']; i = 'C'
|
b = 'babaa'; j = 1; k = 3; w = 'ababaa '
|
b = w[j:len(w) - k]
|
b = 'baba'; j = 1; k = 3; w = 'ababaa '
|
g = [0, 1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 1, -1, -1, -1, -1, -1, -1]; i = 3
|
g[i] = 1
|
g = [0, 1, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; i = 3
|
g = 7; i = 3; j = 3; p = [[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]]
|
g = p[i + 2][j] + p[i + 2][j + 1] + p[i + 2][j + 2]
|
g = 6; i = 3; j = 3; p = [[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]]
|
j = 1; s = ['h', 'e', 'f', 'g']
|
j = len(s) - 1
|
j = 3; s = ['h', 'e', 'f', 'g']
|
d = 3.0; n = 6
|
k = d / float(n)
|
d = 3.0; k = 0.5; n = 6
|
i = 3; j = 3; p = ['a', 'ab', 'abb', 'aabb', 'b', 'bb', 'abb', 'b', 'ab']; s = 'abba'
|
p += [''.join(sorted(s[i:j + 1]))]
|
i = 3; j = 3; p = ['a', 'ab', 'abb', 'aabb', 'b', 'bb', 'abb', 'b', 'ab', 'a']; s = 'abba'
|
l = 1; s = 3
|
x = s - l
|
l = 1; s = 3; x = 2
|
i = 0; j = 2; k = 1; s = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 2]]
|
s.append([i, j, k])
|
i = 0; j = 2; k = 1; s = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 2], [0, 2, 1]]
|
j = 3; o = 107; s = [104, 99, 100, 99]
|
s[j] = o
|
j = 3; o = 107; s = [104, 99, 100, 107]
|
c = 22; i = 0; j = 0; m = [[1, 3, 4], [2, 2, 3], [1, 2, 4]]
|
c = c + m[j][i]
|
c = 23; i = 0; j = 0; m = [[1, 3, 4], [2, 2, 3], [1, 2, 4]]
|
f = 3; g = 4; n = 5; v = [1, 1, 2, 0, 0, 0, 0, 0, 0]
|
v[3] = min(n - f, g - 1)
|
f = 3; g = 4; n = 5; v = [1, 1, 2, 2, 0, 0, 0, 0, 0]
|
y = 3
|
e = y
|
e = 3; y = 3
|
h = ['e', 'd', 'c', 'd']; i = 3; j = 2; l = 5
|
h.append(alphabets[l - i + j])
|
h = ['e', 'd', 'c', 'd', 'b']; i = 3; j = 2; l = 5; w = 'MVwfbmMDYrmbnLk'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.