start
stringlengths 5
368
| code
stringlengths 5
143
| end
stringlengths 5
527
|
---|---|---|
c = [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800]; i = 11
|
c.append(c[i - 1] * i)
|
c = [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800]; i = 11
|
k = 5; m = ['a']; y = 'haveaniceday'
|
m.append(y[k])
|
k = 5; m = ['a', 'n']; y = 'haveaniceday'
|
i = 'O'; o = 45
|
o = ord(i)
|
i = 'O'; o = 79
|
d = 20; q = [0, 6, 8, 10, 11, 15, 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20]
|
q.append(d)
|
d = 20; q = [0, 6, 8, 10, 11, 15, 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20]
|
m = '1010'; o = []
|
o.append(str(len(list(m))))
|
m = '1010'; o = ['4']
|
i = 6; s = ['ive', 'got', 'a', 'lovely', 'bunch', 'of', 'coconuts']; u = 'of'
|
u = s[i]
|
i = 6; s = ['ive', 'got', 'a', 'lovely', 'bunch', 'of', 'coconuts']; u = 'coconuts'
|
h = ['Harsh', '25', '26.5', '28']; i = 2; w = {'Harsh': [25.0]}
|
w[h[0]].append(float(h[i]))
|
h = ['Harsh', '25', '26.5', '28']; i = 2; w = {'Harsh': [25.0, 26.5]}
|
a = 2; b = 1; y = 1
|
y = a % b
|
a = 2; b = 1; y = 0
|
a = 3
|
p.append(a)
|
a = 3; p = [3]
|
o = [[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]]; q = [0, 0, 0, 0, 2, 4]; x = 1; y = 2
|
q.append(o[x + 2][y + 2])
|
o = [[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]]; q = [0, 0, 0, 0, 2, 4, 4]; x = 1; y = 2
|
i = 2; n = 5; s = [10, 5, 20, 20, 4, 5, 2, 25, 1]
|
n = s[i]
|
i = 2; n = 20; s = [10, 5, 20, 20, 4, 5, 2, 25, 1]
|
i = 4; w = ['a', 'b', 'd', 'c']
|
i = len(w)
|
i = 4; w = ['a', 'b', 'd', 'c']
|
i = 0
|
c[i] = 0
|
c = {0: 0}; i = 0
|
k = 5; n = 0; o = 1; p = 0
|
o = p = k = n = 0
|
k = 0; n = 0; o = 0; p = 0
|
i = [1, 0]; j = 5; k = 5
|
k = i[0] + j
|
i = [1, 0]; j = 5; k = 6
|
a = 20
|
a += 1
|
a = 21
|
i = 0; j = 0; y = [[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 0], [1, 0, 0, 0]]
|
y[i][j] = 2
|
i = 0; j = 0; y = [[2, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 0], [1, 0, 0, 0]]
|
g = 'In the third category he included those Brothers'; k = 48; m = ( 'In the third category he included those Brothers..., breathless from his gallop and his excitement. ' )
|
g += m[k]
|
g = 'In the third category he included those Brothers.'; k = 48; m = 'In the third category he included those Brothers..., breathless from his gallop and his excitement. '
|
i = 1; j = 3; k = 1
|
i = j - k
|
i = 2; j = 3; k = 1
|
t = ['100\n', '3\n', '\n', '\n']; u = '\n'
|
t.append(u)
|
t = ['100\n', '3\n', '\n', '\n', '\n']; u = '\n'
|
f = 99
|
f -= 2
|
f = 97
|
s = [120, 210, 300, 30]
|
s = sorted(s)
|
s = [30, 120, 210, 300]
|
x = 1; y = deque([2, 3])
|
y.appendleft(x)
|
x = 1; y = deque([1, 2, 3])
|
b = [['.', '.', '.', '.', '.', '.'], ['O', 'O', 'O', 'O', 'O', '.'], ['.', '.', '.', '.', '.', '.'], ['1', '1', '1', '.', '.', '.'], ['1', '1', '1', '.', '.', '.'], ['.', '1', '1', '.', '.', '.']]; i = 1
|
del b[i][-1]
|
b = [['.', '.', '.', '.', '.', '.'], ['O', 'O', 'O', 'O', 'O'], ['.', '.', '.', '.', '.', '.'], ['1', '1', '1', '.', '.', '.'], ['1', '1', '1', '.', '.', '.'], ['.', '1', '1', '.', '.', '.']]; i = 1
|
d = [1, 4]; g = 1
|
g = d.pop(0)
|
d = [4]; g = 1
|
h = 'a'; m = ['b', 'a']
|
h = m.pop(0)
|
h = 'b'; m = ['a']
|
l = '9999999999999999999999999999999999999999999999999'
|
l += '9'
|
l = '99999999999999999999999999999999999999999999999999'
|
a = [1, 2, 1, 1, 1, 2, 1, 3]; n = 8
|
n = sum(a)
|
a = [1, 2, 1, 1, 1, 2, 1, 3]; n = 12
|
w = 1.7999999999999994e-68
|
w = w / 10
|
w = 1.7999999999999993e-69
|
i = 1
|
r = i
|
i = 1; r = 1
|
d = ['1', '2', '3']
|
z = [int(i) for i in d]
|
d = ['1', '2', '3']; z = [1, 2, 3]
|
c = 'c'; q = {'a': 2, 'b': 2, 'c': 1}
|
q[c] += 1
|
c = 'c'; q = {'a': 2, 'b': 2, 'c': 2}
|
j = 28
|
j += i
|
i = -76; j = -48
|
r = 'This$#'; s = 'i'
|
r += s
|
r = 'This$#i'; s = 'i'
|
l = 1; n = 1000000000000
|
r = n % l
|
l = 1; n = 1000000000000; r = 0
|
j = 7.0; x = [2.0, 1.0]; y = [5.0, 6.0]
|
j = x[1] - y[1]
|
j = -5.0; x = [2.0, 1.0]; y = [5.0, 6.0]
|
d = 'that'; y = 4; z = {(-1): [], (0): ['ab', 'ef', 'ab', 'ef', 'ij'], (6): ['cd', 'gh', 'cd', 'gh'], (4): ['ij']}
|
z[y].append(d)
|
d = 'that'; y = 4; z = {-1: [], 0: ['ab', 'ef', 'ab', 'ef', 'ij'], 6: ['cd', 'gh', 'cd', 'gh'], 4: ['ij', 'that']}
|
j = 1; p = 1000000007; v = [1, 1, 1]
|
v[j] = (v[j] + v[j - 1]) % p
|
j = 1; p = 1000000007; v = [1, 2, 1]
|
g = 100; y = [{'weight': 100, 'sum': 100, 'neighbors': []}, {'weight': 200, 'sum': 200, 'neighbors': []}]
|
y.append({'weight': g, 'sum': g, 'neighbors': []})
|
g = 100; y = [{'weight': 100, 'sum': 100, 'neighbors': []}, {'weight': 200, 'sum': 200, 'neighbors': []}, {'weight': 100, 'sum': 100, 'neighbors': []}]
|
i = 0; l = [3, 2, 2, 2, 1]
|
o = l[i]
|
i = 0; l = [3, 2, 2, 2, 1]; o = 3
|
i = 3; l = 5
|
l = l + int(pow(i, 2))
|
i = 3; l = 14
|
i = 3; j = 0; n = [1, 2, 3]; r = [[1, 1, 1], [1, 1, 1], [1, 2, 2], [0, 0, 0], [0, 0, 0]]; x = 0
|
x = r[i - n[j]][j] if i - n[j] >= 0 else 0
|
i = 3; j = 0; n = [1, 2, 3]; r = [[1, 1, 1], [1, 1, 1], [1, 2, 2], [0, 0, 0], [0, 0, 0]]; x = 1
|
g = '74 93'; m = ['49', '46']
|
m = g.split()
|
g = '74 93'; m = ['74', '93']
|
c = [2, 4, 6, 8]; i = 9
|
i = c[-1]
|
c = [2, 4, 6, 8]; i = 8
|
a = 9; b = 29; c = 7; d = 27
|
e = pow(a, b) + pow(c, d)
|
a = 9; b = 29; c = 7; d = 27; e = 4.7101944096086083e+27
|
a = [1, 4, 4, 2]; i = 1
|
a[i + 1] = a[i + 2]
|
a = [1, 4, 2, 2]; i = 1
|
t = ['a', 'c', 'k', 'e', 'r', 'r', 'a', 'n', 'k']
|
t.pop(0)
|
t = ['c', 'k', 'e', 'r', 'r', 'a', 'n', 'k']
|
d = [1, 91]; u = [26]
|
u.append(d[1])
|
d = [1, 91]; u = [26, 91]
|
g = 0; n = 0; s = [[1, 2, 5]]
|
s[-1][n] = g
|
g = 0; n = 0; s = [[0, 2, 5]]
|
d = 'bcd'; n = {'a': 1, 'ab': 1, 'abc': 1, 'abcd': 1, 'b': 1, 'bc': 1}
|
n[d] = 1
|
d = 'bcd'; n = {'a': 1, 'ab': 1, 'abc': 1, 'abcd': 1, 'b': 1, 'bc': 1, 'bcd': 1}
|
b = 3; n = {1, 2}
|
n.add(b)
|
b = 3; n = {1, 2, 3}
|
i = 4; m = {'h': 2, 'ha': 2, 'hac': 2, 'hack': 1}; q = 'hackerrank'
|
m[q[:i]] += 1
|
i = 4; m = {'h': 2, 'ha': 2, 'hac': 2, 'hack': 2}; q = 'hackerrank'
|
s = 'b'; u = {'a': 3, 'b': 1}
|
u[s] = u.get(s, 0) + 1
|
s = 'b'; u = {'a': 3, 'b': 2}
|
d = 0
|
d = d + 1
|
d = 1
|
n = '2 3'
|
m = int(n[2:])
|
m = 3; n = '2 3'
|
g = ['0', '0', '1', '1']
|
w = int(g[3])
|
g = ['0', '0', '1', '1']; w = 1
|
a = [[0], [1], [1, 1], [1, 2, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 15, 6, 1 ], [1, 7, 21, 21, 7, 1]]; m = [1, 8, 28, 56, 70, 56, 28, 8, 1]
|
a.append(m)
|
a = [[0], [1], [1, 1], [1, 2, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 15, 6, 1], [1, 7, 21, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1]]; m = [1, 8, 28, 56, 70, 56, 28, 8, 1]
|
f = 1; i = 1; r = 6; t = 1000000007
|
p = (f * 10 + r * (i + 1)) % t
|
f = 1; i = 1; p = 22; r = 6; t = 1000000007
|
c = 2; s = 'kkkkkkz'
|
u = s[c]
|
c = 2; s = 'kkkkkkz'; u = 'k'
|
i = 2; j = 5; v = [2, 5, 3, 6]; w = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]
|
w[j] += w[j - v[i - 1]]
|
i = 2; j = 5; v = [2, 5, 3, 6]; w = [1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1]
|
t = 1; x = [1, 0, 0, 0]; y = 2
|
x[y] = t
|
t = 1; x = [1, 0, 1, 0]; y = 2
|
d = 2; h = 1; v = {(1): {}, (2): {}, (3): {}, (4): {}, (5): {}}; x = 1
|
v[x][d] = h
|
d = 2; h = 1; v = {1: {2: 1}, 2: {}, 3: {}, 4: {}, 5: {}}; x = 1
|
w = '5123456789123456'; x = ['5123', '4567', '8912', '3456']
|
x = int(w)
|
w = '5123456789123456'; x = 5123456789123456
|
c = 'acac'; k = 4; l = 3; r = ['b', 'a', 'c', 'ba', 'ac', 'bac']; w = ['b', 'a', 'c', 'ba', 'ac', 'bac']
|
c = r[l] + w[k]
|
c = 'baac'; k = 4; l = 3; r = ['b', 'a', 'c', 'ba', 'ac', 'bac']; w = ['b', 'a', 'c', 'ba', 'ac', 'bac']
|
x = 1
|
i = x
|
i = 1; x = 1
|
b = 6; e = [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]
|
e[b] += 1
|
b = 6; e = [1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
b = 5; d = '4\n'; n = '4'; u = 10; w = 2; y = '12'
|
u, w, b = int(y), int(n), int(d)
|
b = 4; d = '4\n'; n = '4'; u = 12; w = 4; y = '12'
|
c = '1\n2\n'; d = {(1): ['1', '2'], (3): ['100', '111', '200'], (29): [ '12303479849857341718340192371'], (16): ['3084193741082937', '3084193741082938']}; i = 3
|
c += '\n'.join(sorted(d[i])) + '\n'
|
c = '1\n2\n100\n111\n200\n'; d = {1: ['1', '2'], 3: ['100', '111', '200'], 29: ['12303479849857341718340192371'], 16: ['3084193741082937', '3084193741082938']}; i = 3
|
i = 2; j = 5; k = 2; u = [[1, 2, 3, 0, 0, 0], [1, 2, 8, 0, 0, 0], [1, 7, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; y = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200]
|
u[i][k] = abs(y[i] - y[j])
|
i = 2; j = 5; k = 2; u = [[1, 2, 3, 0, 0, 0], [1, 2, 8, 0, 0, 0], [1, 7, 17, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; y = [1, 2, 3, 4, 10, 20, 30, 40, 100, 200]
|
h = '1011010'; n = 8
|
h = '0' * (n - len(h)) + h
|
h = '01011010'; n = 8
|
m = ['2', '5']
|
y = int(m[0])
|
m = ['2', '5']; y = 2
|
b = 1, 2; n = 1; y = 2
|
y, n = b
|
b = (1, 2); n = 2; y = 1
|
a = 1
|
f = a
|
a = 1; f = 1
|
n = 0; o = '011000'
|
o = str(n) + o
|
n = 0; o = '0011000'
|
n = 'SOSSOT'
|
x = len(n) / 3
|
n = 'SOSSOT'; x = 2.0
|
a = 11; r = '2'
|
a = int(r)
|
a = 2; r = '2'
|
d = 1.414214; i = 0; k = -1; o = 1; x = 0
|
d = (i - x) ** 2 + (o - k) ** 2
|
d = 4; i = 0; k = -1; o = 1; x = 0
|
f = ['2', '3\n']; x = '-1 -1\n'
|
f = x.split(' ')
|
f = ['-1', '-1\n']; x = '-1 -1\n'
|
s = {0, 2}
|
n = len(s)
|
n = 2; s = {0, 2}
|
h = 'a'; o = {'a': 1, 'ab': 2, 'abb': 2, 'aabb': 1, 'b': 2, 'bb': 1}
|
o[h] += 1
|
h = 'a'; o = {'a': 2, 'ab': 2, 'abb': 2, 'aabb': 1, 'b': 2, 'bb': 1}
|
c = ['A', 'A', 'A', 'A']; z = 'B'
|
c.append(z)
|
c = ['A', 'A', 'A', 'A', 'B']; z = 'B'
|
h = ['{', '{']; t = '['
|
t = h.pop()
|
h = ['{']; t = '{'
|
g = '1'
|
g += '1'
|
g = '11'
|
a = 'q'; v = {'i': 2, 'f': 1, 'a': 1, 'l': 1, 'u': 1, 'h': 1, 'k': 1, 'q': 1}
|
v[a] += 1
|
a = 'q'; v = {'i': 2, 'f': 1, 'a': 1, 'l': 1, 'u': 1, 'h': 1, 'k': 1, 'q': 2}
|
a = 1; i = 2; n = [2, -1, 2, 3, 4, -5]; v = 1
|
v = a + n[i]
|
a = 1; i = 2; n = [2, -1, 2, 3, 4, -5]; v = 3
|
m = [1]; r = 10
|
m = list(range(1, r + 1))
|
m = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; r = 10
|
n = [1, 3, 5, 7, 9]; o = 5
|
p = max(n[0:o])
|
n = [1, 3, 5, 7, 9]; o = 5; p = 9
|
i = '57'; n = 75
|
n = int(i)
|
i = '57'; n = 57
|
h = ['a', 'b', 'd', 'c']; j = 3
|
j = len(h) - 1
|
h = ['a', 'b', 'd', 'c']; j = 3
|
a = [-1, 1, 2, 3, 4]; i = 5; q = [-1, 1, 2, 3, 4, 5, -1]
|
a.append(q[i])
|
a = [-1, 1, 2, 3, 4, 5]; i = 5; q = [-1, 1, 2, 3, 4, 5, -1]
|
p = 7; w = 8
|
w = p
|
p = 7; w = 7
|
e = [1, 0]; o = [[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]]; x = 1; y = 1
|
e.append(o[x][y + 2])
|
e = [1, 0, 0]; o = [[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]]; x = 1; y = 1
|
i = 12; m = [0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; t = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
|
m[i] = t[i] - 1
|
i = 12; m = [0, -1, -1, -1, 0, -1, -1, -1, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; t = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
|
b = 1.2000000000000007e-42; c = 1.2000000000000006e-41
|
c = b % 10.0
|
b = 1.2000000000000007e-42; c = 1.2000000000000007e-42
|
g = 4; i = 2; s = [3, 4, 21, 36, 10, 28, 35, 5, 24, 42]
|
g = s[i]
|
g = 21; i = 2; s = [3, 4, 21, 36, 10, 28, 35, 5, 24, 42]
|
x = ['.......', '...O...', '....O..', '.......', 'OO.....', 'OO.....']
|
n = type(x)
|
n = <class 'list'>; x = ['.......', '...O...', '....O..', '.......', 'OO.....', 'OO.....']
|
b = []; d = {(9506): 'c', (9702): 'a', (9603): 'b'}; o = 'a'; t = 'c'
|
b.append(d[ord(o) * ord(t)])
|
b = ['b']; d = {9506: 'c', 9702: 'a', 9603: 'b'}; o = 'a'; t = 'c'
|
k = 2; m = 4.336808689942018e-19
|
m /= k
|
k = 2; m = 2.168404344971009e-19
|
e = 3; g = [[11, 2, 4], [4, 5, 6], [10, 8, -12]]; i = 0
|
x.append(g[i][e - 1 - i])
|
e = 3; g = [[11, 2, 4], [4, 5, 6], [10, 8, -12]]; i = 0; x = [4]
|
f = '1111111111111110000111'; g = '1'
|
f += '1' if g == '0' else '0'
|
f = '11111111111111100001110'; g = '1'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.