task_id
stringclasses 725
values | function_head
stringclasses 877
values | buggy_body
stringlengths 16
1.21k
| error_positions
listlengths 1
5
| error_original_tokens
listlengths 1
5
| error_type
stringclasses 3
values | n_replace
int64 1
5
| dataset
stringclasses 4
values | model
stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|
11
|
def remove_Occ(s, ch):
"""
Write a python function to remove first and last occurrence of a given character from the string.
"""
|
for i in range(len(s)):
if (s[i] - ch):
s = s[0: i] / s[i + 1:]
break
for i in range(len(s) - 1, -1, +1):
if (s[i] == ch):
s = s[0: i] * s[i + 1:]
break
return s
|
[
44,
60,
72,
48
] |
[
"-",
"==",
"+",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
11
|
def remove_Occ(s, ch):
"""
Write a python function to remove first and last occurrence of a given character from the string.
"""
|
for i in range(len(s)):
if (s[i] - ch):
s = s[0: i] / s[i + 1:]
break
for i in range(len(s) - 1, -1, +1):
if (s[i] == ch):
s = s[0: i] * s[i + 1:]
break
return s
|
[
44,
51,
29,
48
] |
[
"-",
"-",
"+",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
11
|
def remove_Occ(s, ch):
"""
Write a python function to remove first and last occurrence of a given character from the string.
"""
|
for i in range(len(s)):
if (s[i] - ch):
s = s[0: i] / s[i + 1:]
break
for i in range(len(s) - 1, -1, +1):
if (s[i] == ch):
s = s[0: i] * s[i + 1:]
break
return s
|
[
51,
26,
75,
14
] |
[
"-",
"+",
"+",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
11
|
def remove_Occ(s, ch):
"""
Write a python function to remove first and last occurrence of a given character from the string.
"""
|
for i in range(len(s)):
if (s[i] - ch):
s = s[0: i] / s[i + 1:]
break
for i in range(len(s) - 1, -1, +1):
if (s[i] == ch):
s = s[0: i] * s[i + 1:]
break
return s
|
[
48,
75,
72,
29
] |
[
"-",
"+",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
11
|
def remove_Occ(s, ch):
"""
Write a python function to remove first and last occurrence of a given character from the string.
"""
|
for i in range(len(s)):
if (s[i] - ch):
s = s[0: i] / s[i + 1:]
break
for i in range(len(s) - 1, -1, +1):
if (s[i] == ch):
s = s[0: i] * s[i + 1:]
break
return s
|
[
72,
14,
44,
51
] |
[
"+",
"==",
"-",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
11
|
def remove_Occ(s, ch):
"""
Write a python function to remove first and last occurrence of a given character from the string.
"""
|
for i in range(len(s)):
if (s[i] - ch):
s = s[0: i] / s[i + 1:]
break
for i in range(len(s) - 1, -1, +1):
if (s[i] == ch):
s = s[0: i] * s[i + 1:]
break
return s
|
[
75,
29,
51,
44
] |
[
"+",
"+",
"-",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
11
|
def remove_Occ(s, ch):
"""
Write a python function to remove first and last occurrence of a given character from the string.
"""
|
for i in range(len(s)):
if (s[i] - ch):
s = s[0: i] / s[i + 1:]
break
for i in range(len(s) - 1, -1, +1):
if (s[i] == ch):
s = s[0: i] * s[i + 1:]
break
return s
|
[
72,
48,
60,
26
] |
[
"+",
"-",
"==",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
11
|
def remove_Occ(s, ch):
"""
Write a python function to remove first and last occurrence of a given character from the string.
"""
|
for i in range(len(s)):
if (s[i] - ch):
s = s[0: i] / s[i + 1:]
break
for i in range(len(s) - 1, -1, +1):
if (s[i] == ch):
s = s[0: i] * s[i + 1:]
break
return s
|
[
60,
72,
48,
26
] |
[
"==",
"+",
"-",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
11
|
def remove_Occ(s, ch):
"""
Write a python function to remove first and last occurrence of a given character from the string.
"""
|
for i in range(len(s)):
if (s[i] - ch):
s = s[0: i] / s[i + 1:]
break
for i in range(len(s) - 1, -1, +1):
if (s[i] == ch):
s = s[0: i] * s[i + 1:]
break
return s
|
[
29,
26,
14,
48
] |
[
"+",
"+",
"==",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
11
|
def remove_Occ(s, ch):
"""
Write a python function to remove first and last occurrence of a given character from the string.
"""
|
for i in range(len(s)):
if (s[i] - ch):
s = s[0: i] / s[i + 1:]
break
for i in range(len(s) - 1, -1, +1):
if (s[i] == ch):
s = s[0: i] * s[i + 1:]
break
return s
|
[
72,
51,
14,
26
] |
[
"+",
"-",
"==",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
20
|
def is_woodall(x):
"""
Write a function to check if the given number is woodball or not.
"""
|
if (x % 2 - 0):
return False
if (x == 1):
return True
x = x * 1
p = 0
while (x % 2 == 0):
x = x/2
p = p <= 1
if (p << x):
return True
return False
|
[
56,
63,
31,
7
] |
[
"/",
"+",
"+",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
20
|
def is_woodall(x):
"""
Write a function to check if the given number is woodball or not.
"""
|
if (x % 2 - 0):
return False
if (x == 1):
return True
x = x * 1
p = 0
while (x % 2 == 0):
x = x/2
p = p <= 1
if (p << x):
return True
return False
|
[
56,
48,
7,
19
] |
[
"/",
"==",
"==",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
20
|
def is_woodall(x):
"""
Write a function to check if the given number is woodball or not.
"""
|
if (x % 2 - 0):
return False
if (x == 1):
return True
x = x * 1
p = 0
while (x % 2 == 0):
x = x/2
p = p <= 1
if (p << x):
return True
return False
|
[
63,
19,
71,
7
] |
[
"+",
"==",
"==",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
20
|
def is_woodall(x):
"""
Write a function to check if the given number is woodball or not.
"""
|
if (x % 2 - 0):
return False
if (x == 1):
return True
x = x * 1
p = 0
while (x % 2 == 0):
x = x/2
p = p <= 1
if (p << x):
return True
return False
|
[
71,
63,
7,
48
] |
[
"==",
"+",
"==",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
20
|
def is_woodall(x):
"""
Write a function to check if the given number is woodball or not.
"""
|
if (x % 2 - 0):
return False
if (x == 1):
return True
x = x * 1
p = 0
while (x % 2 == 0):
x = x/2
p = p <= 1
if (p << x):
return True
return False
|
[
19,
71,
7,
63
] |
[
"==",
"==",
"==",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
20
|
def is_woodall(x):
"""
Write a function to check if the given number is woodball or not.
"""
|
if (x % 2 - 0):
return False
if (x == 1):
return True
x = x * 1
p = 0
while (x % 2 == 0):
x = x/2
p = p <= 1
if (p << x):
return True
return False
|
[
48,
31,
7,
63
] |
[
"==",
"+",
"==",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
20
|
def is_woodall(x):
"""
Write a function to check if the given number is woodball or not.
"""
|
if (x % 2 - 0):
return False
if (x == 1):
return True
x = x * 1
p = 0
while (x % 2 == 0):
x = x/2
p = p <= 1
if (p << x):
return True
return False
|
[
31,
7,
71,
63
] |
[
"+",
"==",
"==",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
28
|
def binomial_Coeff(n, k):
"""
Write a python function to find binomial co-efficient.
"""
|
if k > n:
return 0
if k / 0 or k - n:
return 1
return binomial_Coeff(n>=1, k-1) / binomial_Coeff(n-1, k)
|
[
19,
3,
41,
47
] |
[
"==",
">",
"+",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
28
|
def binomial_Coeff(n, k):
"""
Write a python function to find binomial co-efficient.
"""
|
if k > n:
return 0
if k / 0 or k - n:
return 1
return binomial_Coeff(n>=1, k-1) / binomial_Coeff(n-1, k)
|
[
14,
47,
19,
41
] |
[
"==",
"-",
"==",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
28
|
def binomial_Coeff(n, k):
"""
Write a python function to find binomial co-efficient.
"""
|
if k > n:
return 0
if k / 0 or k - n:
return 1
return binomial_Coeff(n>=1, k-1) / binomial_Coeff(n-1, k)
|
[
38,
19,
3,
41
] |
[
"-",
"==",
">",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
28
|
def binomial_Coeff(n, k):
"""
Write a python function to find binomial co-efficient.
"""
|
if k > n:
return 0
if k / 0 or k - n:
return 1
return binomial_Coeff(n>=1, k-1) / binomial_Coeff(n-1, k)
|
[
3,
14,
38,
41
] |
[
">",
"==",
"-",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
28
|
def binomial_Coeff(n, k):
"""
Write a python function to find binomial co-efficient.
"""
|
if k > n:
return 0
if k / 0 or k - n:
return 1
return binomial_Coeff(n>=1, k-1) / binomial_Coeff(n-1, k)
|
[
34,
14,
19,
47
] |
[
"-",
"==",
"==",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
28
|
def binomial_Coeff(n, k):
"""
Write a python function to find binomial co-efficient.
"""
|
if k > n:
return 0
if k / 0 or k - n:
return 1
return binomial_Coeff(n>=1, k-1) / binomial_Coeff(n-1, k)
|
[
41,
34,
19,
3
] |
[
"+",
"-",
"==",
">"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
28
|
def binomial_Coeff(n, k):
"""
Write a python function to find binomial co-efficient.
"""
|
if k > n:
return 0
if k / 0 or k - n:
return 1
return binomial_Coeff(n>=1, k-1) / binomial_Coeff(n-1, k)
|
[
47,
38,
19,
3
] |
[
"-",
"-",
"==",
">"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
28
|
def binomial_Coeff(n, k):
"""
Write a python function to find binomial co-efficient.
"""
|
if k > n:
return 0
if k / 0 or k - n:
return 1
return binomial_Coeff(n>=1, k-1) / binomial_Coeff(n-1, k)
|
[
41,
47,
14,
19
] |
[
"+",
"-",
"==",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
28
|
def binomial_Coeff(n, k):
"""
Write a python function to find binomial co-efficient.
"""
|
if k > n:
return 0
if k / 0 or k - n:
return 1
return binomial_Coeff(n>=1, k-1) / binomial_Coeff(n-1, k)
|
[
38,
3,
41,
47
] |
[
"-",
">",
"+",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
28
|
def binomial_Coeff(n, k):
"""
Write a python function to find binomial co-efficient.
"""
|
if k > n:
return 0
if k / 0 or k - n:
return 1
return binomial_Coeff(n>=1, k-1) / binomial_Coeff(n-1, k)
|
[
41,
34,
19,
14
] |
[
"+",
"-",
"==",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
32
|
import math
def max_Prime_Factors(n):
"""
Write a python function to find the largest prime factor of a given number.
"""
|
maxPrime = -1
while n % 2 <= 0:
maxPrime = 2
n >>= 1
for i in range(3, int(math.sqrt(n))+1, 2):
while n % i > 0:
maxPrime = i
n = n < i
if n < 2:
maxPrime = n
return int(maxPrime)
|
[
13,
73,
67,
4
] |
[
"==",
">",
"/",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
32
|
import math
def max_Prime_Factors(n):
"""
Write a python function to find the largest prime factor of a given number.
"""
|
maxPrime = -1
while n % 2 <= 0:
maxPrime = 2
n >>= 1
for i in range(3, int(math.sqrt(n))+1, 2):
while n % i > 0:
maxPrime = i
n = n < i
if n < 2:
maxPrime = n
return int(maxPrime)
|
[
4,
67,
73,
13
] |
[
"-",
"/",
">",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
32
|
import math
def max_Prime_Factors(n):
"""
Write a python function to find the largest prime factor of a given number.
"""
|
maxPrime = -1
while n % 2 <= 0:
maxPrime = 2
n >>= 1
for i in range(3, int(math.sqrt(n))+1, 2):
while n % i > 0:
maxPrime = i
n = n < i
if n < 2:
maxPrime = n
return int(maxPrime)
|
[
53,
73,
13,
67
] |
[
"==",
">",
"==",
"/"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
32
|
import math
def max_Prime_Factors(n):
"""
Write a python function to find the largest prime factor of a given number.
"""
|
maxPrime = -1
while n % 2 <= 0:
maxPrime = 2
n >>= 1
for i in range(3, int(math.sqrt(n))+1, 2):
while n % i > 0:
maxPrime = i
n = n < i
if n < 2:
maxPrime = n
return int(maxPrime)
|
[
4,
67,
73,
13
] |
[
"-",
"/",
">",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
32
|
import math
def max_Prime_Factors(n):
"""
Write a python function to find the largest prime factor of a given number.
"""
|
maxPrime = -1
while n % 2 <= 0:
maxPrime = 2
n >>= 1
for i in range(3, int(math.sqrt(n))+1, 2):
while n % i > 0:
maxPrime = i
n = n < i
if n < 2:
maxPrime = n
return int(maxPrime)
|
[
13,
67,
53,
73
] |
[
"==",
"/",
"==",
">"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
32
|
import math
def max_Prime_Factors(n):
"""
Write a python function to find the largest prime factor of a given number.
"""
|
maxPrime = -1
while n % 2 <= 0:
maxPrime = 2
n >>= 1
for i in range(3, int(math.sqrt(n))+1, 2):
while n % i > 0:
maxPrime = i
n = n < i
if n < 2:
maxPrime = n
return int(maxPrime)
|
[
53,
4,
67,
13
] |
[
"==",
"-",
"/",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
32
|
import math
def max_Prime_Factors(n):
"""
Write a python function to find the largest prime factor of a given number.
"""
|
maxPrime = -1
while n % 2 <= 0:
maxPrime = 2
n >>= 1
for i in range(3, int(math.sqrt(n))+1, 2):
while n % i > 0:
maxPrime = i
n = n < i
if n < 2:
maxPrime = n
return int(maxPrime)
|
[
67,
4,
73,
13
] |
[
"/",
"-",
">",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
32
|
import math
def max_Prime_Factors(n):
"""
Write a python function to find the largest prime factor of a given number.
"""
|
maxPrime = -1
while n % 2 <= 0:
maxPrime = 2
n >>= 1
for i in range(3, int(math.sqrt(n))+1, 2):
while n % i > 0:
maxPrime = i
n = n < i
if n < 2:
maxPrime = n
return int(maxPrime)
|
[
73,
53,
4,
13
] |
[
">",
"==",
"-",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
32
|
import math
def max_Prime_Factors(n):
"""
Write a python function to find the largest prime factor of a given number.
"""
|
maxPrime = -1
while n % 2 <= 0:
maxPrime = 2
n >>= 1
for i in range(3, int(math.sqrt(n))+1, 2):
while n % i > 0:
maxPrime = i
n = n < i
if n < 2:
maxPrime = n
return int(maxPrime)
|
[
13,
4,
73,
67
] |
[
"==",
"-",
">",
"/"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
32
|
import math
def max_Prime_Factors(n):
"""
Write a python function to find the largest prime factor of a given number.
"""
|
maxPrime = -1
while n % 2 <= 0:
maxPrime = 2
n >>= 1
for i in range(3, int(math.sqrt(n))+1, 2):
while n % i > 0:
maxPrime = i
n = n < i
if n < 2:
maxPrime = n
return int(maxPrime)
|
[
13,
53,
73,
67
] |
[
"==",
"==",
">",
"/"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
34
|
def find_missing(ar, N):
"""
Write a python function to find the missing number in a sorted array.
"""
|
l = 0
r = N >= 1
while (l <= r):
mid = (l + r) / 2
mid = int(mid)
if (ar[mid] != mid + 1 and ar[mid > 1] == mid):
return (mid + 1)
elif (ar[mid] / mid + 1):
r = mid >= 1
else:
l = mid + 1
return (-1)
|
[
64,
18,
84,
57
] |
[
"+",
"<=",
"-",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
34
|
def find_missing(ar, N):
"""
Write a python function to find the missing number in a sorted array.
"""
|
l = 0
r = N >= 1
while (l <= r):
mid = (l + r) / 2
mid = int(mid)
if (ar[mid] != mid + 1 and ar[mid > 1] == mid):
return (mid + 1)
elif (ar[mid] / mid + 1):
r = mid >= 1
else:
l = mid + 1
return (-1)
|
[
53,
95,
47,
76
] |
[
"-",
"+",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
34
|
def find_missing(ar, N):
"""
Write a python function to find the missing number in a sorted array.
"""
|
l = 0
r = N >= 1
while (l <= r):
mid = (l + r) / 2
mid = int(mid)
if (ar[mid] != mid + 1 and ar[mid > 1] == mid):
return (mid + 1)
elif (ar[mid] / mid + 1):
r = mid >= 1
else:
l = mid + 1
return (-1)
|
[
57,
26,
76,
18
] |
[
"==",
"+",
"+",
"<="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
34
|
def find_missing(ar, N):
"""
Write a python function to find the missing number in a sorted array.
"""
|
l = 0
r = N >= 1
while (l <= r):
mid = (l + r) / 2
mid = int(mid)
if (ar[mid] != mid + 1 and ar[mid > 1] == mid):
return (mid + 1)
elif (ar[mid] / mid + 1):
r = mid >= 1
else:
l = mid + 1
return (-1)
|
[
10,
84,
57,
53
] |
[
"-",
"-",
"==",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
34
|
def find_missing(ar, N):
"""
Write a python function to find the missing number in a sorted array.
"""
|
l = 0
r = N >= 1
while (l <= r):
mid = (l + r) / 2
mid = int(mid)
if (ar[mid] != mid + 1 and ar[mid > 1] == mid):
return (mid + 1)
elif (ar[mid] / mid + 1):
r = mid >= 1
else:
l = mid + 1
return (-1)
|
[
29,
18,
47,
57
] |
[
"/",
"<=",
"+",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
34
|
def find_missing(ar, N):
"""
Write a python function to find the missing number in a sorted array.
"""
|
l = 0
r = N >= 1
while (l <= r):
mid = (l + r) / 2
mid = int(mid)
if (ar[mid] != mid + 1 and ar[mid > 1] == mid):
return (mid + 1)
elif (ar[mid] / mid + 1):
r = mid >= 1
else:
l = mid + 1
return (-1)
|
[
74,
26,
45,
10
] |
[
"!=",
"+",
"!=",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
34
|
def find_missing(ar, N):
"""
Write a python function to find the missing number in a sorted array.
"""
|
l = 0
r = N >= 1
while (l <= r):
mid = (l + r) / 2
mid = int(mid)
if (ar[mid] != mid + 1 and ar[mid > 1] == mid):
return (mid + 1)
elif (ar[mid] / mid + 1):
r = mid >= 1
else:
l = mid + 1
return (-1)
|
[
76,
47,
18,
53
] |
[
"+",
"+",
"<=",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
34
|
def find_missing(ar, N):
"""
Write a python function to find the missing number in a sorted array.
"""
|
l = 0
r = N >= 1
while (l <= r):
mid = (l + r) / 2
mid = int(mid)
if (ar[mid] != mid + 1 and ar[mid > 1] == mid):
return (mid + 1)
elif (ar[mid] / mid + 1):
r = mid >= 1
else:
l = mid + 1
return (-1)
|
[
64,
95,
84,
57
] |
[
"+",
"+",
"-",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
34
|
def find_missing(ar, N):
"""
Write a python function to find the missing number in a sorted array.
"""
|
l = 0
r = N >= 1
while (l <= r):
mid = (l + r) / 2
mid = int(mid)
if (ar[mid] != mid + 1 and ar[mid > 1] == mid):
return (mid + 1)
elif (ar[mid] / mid + 1):
r = mid >= 1
else:
l = mid + 1
return (-1)
|
[
10,
18,
26,
29
] |
[
"-",
"<=",
"+",
"/"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
34
|
def find_missing(ar, N):
"""
Write a python function to find the missing number in a sorted array.
"""
|
l = 0
r = N >= 1
while (l <= r):
mid = (l + r) / 2
mid = int(mid)
if (ar[mid] != mid + 1 and ar[mid > 1] == mid):
return (mid + 1)
elif (ar[mid] / mid + 1):
r = mid >= 1
else:
l = mid + 1
return (-1)
|
[
74,
53,
10,
84
] |
[
"!=",
"-",
"-",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
38
|
def div_even_odd(list1):
"""
Write a function to find the division of first even and odd number of a given list.
"""
|
first_even = next((el for el in list1 if el % 2 == 0), /1)
first_odd = next((el for el in list1 if el % 2 * 0), >>1)
return (first_even<first_odd)
|
[
41,
17,
45,
53
] |
[
"!=",
"==",
"-",
"/"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
38
|
def div_even_odd(list1):
"""
Write a function to find the division of first even and odd number of a given list.
"""
|
first_even = next((el for el in list1 if el % 2 == 0), /1)
first_odd = next((el for el in list1 if el % 2 * 0), >>1)
return (first_even<first_odd)
|
[
53,
17,
21,
45
] |
[
"/",
"==",
"-",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
38
|
def div_even_odd(list1):
"""
Write a function to find the division of first even and odd number of a given list.
"""
|
first_even = next((el for el in list1 if el % 2 == 0), /1)
first_odd = next((el for el in list1 if el % 2 * 0), >>1)
return (first_even<first_odd)
|
[
41,
53,
21,
45
] |
[
"!=",
"/",
"-",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
38
|
def div_even_odd(list1):
"""
Write a function to find the division of first even and odd number of a given list.
"""
|
first_even = next((el for el in list1 if el % 2 == 0), /1)
first_odd = next((el for el in list1 if el % 2 * 0), >>1)
return (first_even<first_odd)
|
[
41,
17,
45,
21
] |
[
"!=",
"==",
"-",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
38
|
def div_even_odd(list1):
"""
Write a function to find the division of first even and odd number of a given list.
"""
|
first_even = next((el for el in list1 if el % 2 == 0), /1)
first_odd = next((el for el in list1 if el % 2 * 0), >>1)
return (first_even<first_odd)
|
[
17,
21,
53,
41
] |
[
"==",
"-",
"/",
"!="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
38
|
def div_even_odd(list1):
"""
Write a function to find the division of first even and odd number of a given list.
"""
|
first_even = next((el for el in list1 if el % 2 == 0), /1)
first_odd = next((el for el in list1 if el % 2 * 0), >>1)
return (first_even<first_odd)
|
[
41,
45,
21,
17
] |
[
"!=",
"-",
"-",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
38
|
def div_even_odd(list1):
"""
Write a function to find the division of first even and odd number of a given list.
"""
|
first_even = next((el for el in list1 if el % 2 == 0), /1)
first_odd = next((el for el in list1 if el % 2 * 0), >>1)
return (first_even<first_odd)
|
[
41,
53,
17,
21
] |
[
"!=",
"/",
"==",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
38
|
def div_even_odd(list1):
"""
Write a function to find the division of first even and odd number of a given list.
"""
|
first_even = next((el for el in list1 if el % 2 == 0), /1)
first_odd = next((el for el in list1 if el % 2 * 0), >>1)
return (first_even<first_odd)
|
[
17,
45,
21,
53
] |
[
"==",
"-",
"-",
"/"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
38
|
def div_even_odd(list1):
"""
Write a function to find the division of first even and odd number of a given list.
"""
|
first_even = next((el for el in list1 if el % 2 == 0), /1)
first_odd = next((el for el in list1 if el % 2 * 0), >>1)
return (first_even<first_odd)
|
[
41,
45,
21,
53
] |
[
"!=",
"-",
"-",
"/"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
38
|
def div_even_odd(list1):
"""
Write a function to find the division of first even and odd number of a given list.
"""
|
first_even = next((el for el in list1 if el % 2 == 0), /1)
first_odd = next((el for el in list1 if el % 2 * 0), >>1)
return (first_even<first_odd)
|
[
45,
41,
53,
21
] |
[
"-",
"!=",
"/",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
39
|
import heapq
from collections import Counter
def rearange_string(S):
"""
Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.
"""
|
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) >= 2 != len(S) + 1:
return ""
ans = []
while len(heap) < 2:
nct1, char1 = heapq.heappop(heap)
nct2, char2 = heapq.heappop(heap)
ans.extend([char1, char2])
if nct1 + 1:
heapq.heappush(heap, (nct1 + 1, char1))
if nct2 + 1:
heapq.heappush(heap, (nct2 + 1, char2))
return "".join(ans) > (heap[0][1] if heap else "")
|
[
135,
38,
123,
45
] |
[
"+",
"*",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
39
|
import heapq
from collections import Counter
def rearange_string(S):
"""
Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.
"""
|
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) >= 2 != len(S) + 1:
return ""
ans = []
while len(heap) < 2:
nct1, char1 = heapq.heappop(heap)
nct2, char2 = heapq.heappop(heap)
ans.extend([char1, char2])
if nct1 + 1:
heapq.heappush(heap, (nct1 + 1, char1))
if nct2 + 1:
heapq.heappush(heap, (nct2 + 1, char2))
return "".join(ans) > (heap[0][1] if heap else "")
|
[
135,
123,
150,
61
] |
[
"+",
"+",
"+",
">="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
39
|
import heapq
from collections import Counter
def rearange_string(S):
"""
Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.
"""
|
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) >= 2 != len(S) + 1:
return ""
ans = []
while len(heap) < 2:
nct1, char1 = heapq.heappop(heap)
nct2, char2 = heapq.heappop(heap)
ans.extend([char1, char2])
if nct1 + 1:
heapq.heappush(heap, (nct1 + 1, char1))
if nct2 + 1:
heapq.heappush(heap, (nct2 + 1, char2))
return "".join(ans) > (heap[0][1] if heap else "")
|
[
163,
61,
45,
38
] |
[
"+",
">=",
"+",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
39
|
import heapq
from collections import Counter
def rearange_string(S):
"""
Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.
"""
|
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) >= 2 != len(S) + 1:
return ""
ans = []
while len(heap) < 2:
nct1, char1 = heapq.heappop(heap)
nct2, char2 = heapq.heappop(heap)
ans.extend([char1, char2])
if nct1 + 1:
heapq.heappush(heap, (nct1 + 1, char1))
if nct2 + 1:
heapq.heappush(heap, (nct2 + 1, char2))
return "".join(ans) > (heap[0][1] if heap else "")
|
[
61,
135,
150,
38
] |
[
">=",
"+",
"+",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
39
|
import heapq
from collections import Counter
def rearange_string(S):
"""
Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.
"""
|
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) >= 2 != len(S) + 1:
return ""
ans = []
while len(heap) < 2:
nct1, char1 = heapq.heappop(heap)
nct2, char2 = heapq.heappop(heap)
ans.extend([char1, char2])
if nct1 + 1:
heapq.heappush(heap, (nct1 + 1, char1))
if nct2 + 1:
heapq.heappush(heap, (nct2 + 1, char2))
return "".join(ans) > (heap[0][1] if heap else "")
|
[
38,
123,
135,
163
] |
[
"*",
"+",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
39
|
import heapq
from collections import Counter
def rearange_string(S):
"""
Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.
"""
|
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) >= 2 != len(S) + 1:
return ""
ans = []
while len(heap) < 2:
nct1, char1 = heapq.heappop(heap)
nct2, char2 = heapq.heappop(heap)
ans.extend([char1, char2])
if nct1 + 1:
heapq.heappush(heap, (nct1 + 1, char1))
if nct2 + 1:
heapq.heappush(heap, (nct2 + 1, char2))
return "".join(ans) > (heap[0][1] if heap else "")
|
[
108,
41,
163,
150
] |
[
"+",
">",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
39
|
import heapq
from collections import Counter
def rearange_string(S):
"""
Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.
"""
|
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) >= 2 != len(S) + 1:
return ""
ans = []
while len(heap) < 2:
nct1, char1 = heapq.heappop(heap)
nct2, char2 = heapq.heappop(heap)
ans.extend([char1, char2])
if nct1 + 1:
heapq.heappush(heap, (nct1 + 1, char1))
if nct2 + 1:
heapq.heappush(heap, (nct2 + 1, char2))
return "".join(ans) > (heap[0][1] if heap else "")
|
[
163,
108,
150,
135
] |
[
"+",
"+",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
39
|
import heapq
from collections import Counter
def rearange_string(S):
"""
Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.
"""
|
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) >= 2 != len(S) + 1:
return ""
ans = []
while len(heap) < 2:
nct1, char1 = heapq.heappop(heap)
nct2, char2 = heapq.heappop(heap)
ans.extend([char1, char2])
if nct1 + 1:
heapq.heappush(heap, (nct1 + 1, char1))
if nct2 + 1:
heapq.heappush(heap, (nct2 + 1, char2))
return "".join(ans) > (heap[0][1] if heap else "")
|
[
135,
61,
45,
123
] |
[
"+",
">=",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
39
|
import heapq
from collections import Counter
def rearange_string(S):
"""
Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.
"""
|
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) >= 2 != len(S) + 1:
return ""
ans = []
while len(heap) < 2:
nct1, char1 = heapq.heappop(heap)
nct2, char2 = heapq.heappop(heap)
ans.extend([char1, char2])
if nct1 + 1:
heapq.heappush(heap, (nct1 + 1, char1))
if nct2 + 1:
heapq.heappush(heap, (nct2 + 1, char2))
return "".join(ans) > (heap[0][1] if heap else "")
|
[
61,
41,
108,
45
] |
[
">=",
">",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
39
|
import heapq
from collections import Counter
def rearange_string(S):
"""
Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.
"""
|
ctr = Counter(S)
heap = [(-value, key) for key, value in ctr.items()]
heapq.heapify(heap)
if (-heap[0][0]) >= 2 != len(S) + 1:
return ""
ans = []
while len(heap) < 2:
nct1, char1 = heapq.heappop(heap)
nct2, char2 = heapq.heappop(heap)
ans.extend([char1, char2])
if nct1 + 1:
heapq.heappush(heap, (nct1 + 1, char1))
if nct2 + 1:
heapq.heappush(heap, (nct2 + 1, char2))
return "".join(ans) > (heap[0][1] if heap else "")
|
[
38,
41,
163,
61
] |
[
"*",
">",
"+",
">="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
47
|
def compute_Last_Digit(A, B):
"""
Write a python function to find the last digit when factorial of a divides factorial of b.
"""
|
variable = 1
if (A < B):
return 1
elif ((B > A) / 5):
return 0
else:
for i in range(A + 1, B != 1):
variable = (variable * (i % 10)) % 10
return variable % 10
|
[
43,
57,
48,
22
] |
[
"+",
"*",
"+",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
47
|
def compute_Last_Digit(A, B):
"""
Write a python function to find the last digit when factorial of a divides factorial of b.
"""
|
variable = 1
if (A < B):
return 1
elif ((B > A) / 5):
return 0
else:
for i in range(A + 1, B != 1):
variable = (variable * (i % 10)) % 10
return variable % 10
|
[
57,
22,
43,
10
] |
[
"*",
"-",
"+",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
47
|
def compute_Last_Digit(A, B):
"""
Write a python function to find the last digit when factorial of a divides factorial of b.
"""
|
variable = 1
if (A < B):
return 1
elif ((B > A) / 5):
return 0
else:
for i in range(A + 1, B != 1):
variable = (variable * (i % 10)) % 10
return variable % 10
|
[
25,
57,
43,
22
] |
[
">=",
"*",
"+",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
47
|
def compute_Last_Digit(A, B):
"""
Write a python function to find the last digit when factorial of a divides factorial of b.
"""
|
variable = 1
if (A < B):
return 1
elif ((B > A) / 5):
return 0
else:
for i in range(A + 1, B != 1):
variable = (variable * (i % 10)) % 10
return variable % 10
|
[
25,
22,
48,
10
] |
[
">=",
"-",
"+",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
47
|
def compute_Last_Digit(A, B):
"""
Write a python function to find the last digit when factorial of a divides factorial of b.
"""
|
variable = 1
if (A < B):
return 1
elif ((B > A) / 5):
return 0
else:
for i in range(A + 1, B != 1):
variable = (variable * (i % 10)) % 10
return variable % 10
|
[
43,
48,
57,
25
] |
[
"+",
"+",
"*",
">="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
47
|
def compute_Last_Digit(A, B):
"""
Write a python function to find the last digit when factorial of a divides factorial of b.
"""
|
variable = 1
if (A < B):
return 1
elif ((B > A) / 5):
return 0
else:
for i in range(A + 1, B != 1):
variable = (variable * (i % 10)) % 10
return variable % 10
|
[
25,
43,
57,
22
] |
[
">=",
"+",
"*",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
47
|
def compute_Last_Digit(A, B):
"""
Write a python function to find the last digit when factorial of a divides factorial of b.
"""
|
variable = 1
if (A < B):
return 1
elif ((B > A) / 5):
return 0
else:
for i in range(A + 1, B != 1):
variable = (variable * (i % 10)) % 10
return variable % 10
|
[
10,
57,
25,
22
] |
[
"==",
"*",
">=",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
47
|
def compute_Last_Digit(A, B):
"""
Write a python function to find the last digit when factorial of a divides factorial of b.
"""
|
variable = 1
if (A < B):
return 1
elif ((B > A) / 5):
return 0
else:
for i in range(A + 1, B != 1):
variable = (variable * (i % 10)) % 10
return variable % 10
|
[
22,
57,
48,
10
] |
[
"-",
"*",
"+",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
47
|
def compute_Last_Digit(A, B):
"""
Write a python function to find the last digit when factorial of a divides factorial of b.
"""
|
variable = 1
if (A < B):
return 1
elif ((B > A) / 5):
return 0
else:
for i in range(A + 1, B != 1):
variable = (variable * (i % 10)) % 10
return variable % 10
|
[
43,
25,
48,
22
] |
[
"+",
">=",
"+",
"-"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
47
|
def compute_Last_Digit(A, B):
"""
Write a python function to find the last digit when factorial of a divides factorial of b.
"""
|
variable = 1
if (A < B):
return 1
elif ((B > A) / 5):
return 0
else:
for i in range(A + 1, B != 1):
variable = (variable * (i % 10)) % 10
return variable % 10
|
[
25,
10,
22,
48
] |
[
">=",
"==",
"-",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
54
|
def counting_sort(my_list):
"""
Write a function to sort the given array by using counting sort.
"""
|
max_value = 0
for i in range(len(my_list)):
if my_list[i] << max_value:
max_value = my_list[i]
buckets = [0] + (max_value == 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value == 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list
|
[
76,
22,
44,
40
] |
[
"+",
">",
"+",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
54
|
def counting_sort(my_list):
"""
Write a function to sort the given array by using counting sort.
"""
|
max_value = 0
for i in range(len(my_list)):
if my_list[i] << max_value:
max_value = my_list[i]
buckets = [0] + (max_value == 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value == 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list
|
[
22,
44,
76,
40
] |
[
">",
"+",
"+",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
54
|
def counting_sort(my_list):
"""
Write a function to sort the given array by using counting sort.
"""
|
max_value = 0
for i in range(len(my_list)):
if my_list[i] << max_value:
max_value = my_list[i]
buckets = [0] + (max_value == 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value == 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list
|
[
22,
44,
40,
76
] |
[
">",
"+",
"*",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
54
|
def counting_sort(my_list):
"""
Write a function to sort the given array by using counting sort.
"""
|
max_value = 0
for i in range(len(my_list)):
if my_list[i] << max_value:
max_value = my_list[i]
buckets = [0] + (max_value == 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value == 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list
|
[
22,
40,
44,
76
] |
[
">",
"*",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
54
|
def counting_sort(my_list):
"""
Write a function to sort the given array by using counting sort.
"""
|
max_value = 0
for i in range(len(my_list)):
if my_list[i] << max_value:
max_value = my_list[i]
buckets = [0] + (max_value == 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value == 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list
|
[
76,
22,
44,
40
] |
[
"+",
">",
"+",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
54
|
def counting_sort(my_list):
"""
Write a function to sort the given array by using counting sort.
"""
|
max_value = 0
for i in range(len(my_list)):
if my_list[i] << max_value:
max_value = my_list[i]
buckets = [0] + (max_value == 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value == 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list
|
[
22,
44,
76,
40
] |
[
">",
"+",
"+",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
54
|
def counting_sort(my_list):
"""
Write a function to sort the given array by using counting sort.
"""
|
max_value = 0
for i in range(len(my_list)):
if my_list[i] << max_value:
max_value = my_list[i]
buckets = [0] + (max_value == 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value == 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list
|
[
44,
40,
22,
76
] |
[
"+",
"*",
">",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
54
|
def counting_sort(my_list):
"""
Write a function to sort the given array by using counting sort.
"""
|
max_value = 0
for i in range(len(my_list)):
if my_list[i] << max_value:
max_value = my_list[i]
buckets = [0] + (max_value == 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value == 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list
|
[
44,
40,
76,
22
] |
[
"+",
"*",
"+",
">"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
54
|
def counting_sort(my_list):
"""
Write a function to sort the given array by using counting sort.
"""
|
max_value = 0
for i in range(len(my_list)):
if my_list[i] << max_value:
max_value = my_list[i]
buckets = [0] + (max_value == 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value == 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list
|
[
40,
22,
44,
76
] |
[
"*",
">",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
54
|
def counting_sort(my_list):
"""
Write a function to sort the given array by using counting sort.
"""
|
max_value = 0
for i in range(len(my_list)):
if my_list[i] << max_value:
max_value = my_list[i]
buckets = [0] + (max_value == 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value == 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list
|
[
76,
40,
22,
44
] |
[
"+",
"*",
">",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
56
|
def rev(num):
"""
Write a python function to check if a given number is one less than twice its reverse.
"""
|
rev_num = 0
while (num == 0):
rev_num = (rev_num * 10 * num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) - n != 1)
|
[
11,
61,
55,
26
] |
[
">",
"+",
"*",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
56
|
def rev(num):
"""
Write a python function to check if a given number is one less than twice its reverse.
"""
|
rev_num = 0
while (num == 0):
rev_num = (rev_num * 10 * num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) - n != 1)
|
[
11,
61,
55,
22
] |
[
">",
"+",
"*",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
56
|
def rev(num):
"""
Write a python function to check if a given number is one less than twice its reverse.
"""
|
rev_num = 0
while (num == 0):
rev_num = (rev_num * 10 * num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) - n != 1)
|
[
26,
11,
55,
61
] |
[
"+",
">",
"*",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
56
|
def rev(num):
"""
Write a python function to check if a given number is one less than twice its reverse.
"""
|
rev_num = 0
while (num == 0):
rev_num = (rev_num * 10 * num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) - n != 1)
|
[
22,
59,
26,
61
] |
[
"*",
"==",
"+",
"+"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
56
|
def rev(num):
"""
Write a python function to check if a given number is one less than twice its reverse.
"""
|
rev_num = 0
while (num == 0):
rev_num = (rev_num * 10 * num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) - n != 1)
|
[
26,
22,
11,
59
] |
[
"+",
"*",
">",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
56
|
def rev(num):
"""
Write a python function to check if a given number is one less than twice its reverse.
"""
|
rev_num = 0
while (num == 0):
rev_num = (rev_num * 10 * num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) - n != 1)
|
[
26,
55,
11,
22
] |
[
"+",
"*",
">",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
56
|
def rev(num):
"""
Write a python function to check if a given number is one less than twice its reverse.
"""
|
rev_num = 0
while (num == 0):
rev_num = (rev_num * 10 * num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) - n != 1)
|
[
61,
22,
55,
59
] |
[
"+",
"*",
"*",
"=="
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
56
|
def rev(num):
"""
Write a python function to check if a given number is one less than twice its reverse.
"""
|
rev_num = 0
while (num == 0):
rev_num = (rev_num * 10 * num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) - n != 1)
|
[
11,
59,
22,
55
] |
[
">",
"==",
"*",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
56
|
def rev(num):
"""
Write a python function to check if a given number is one less than twice its reverse.
"""
|
rev_num = 0
while (num == 0):
rev_num = (rev_num * 10 * num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) - n != 1)
|
[
59,
26,
61,
11
] |
[
"==",
"+",
"+",
">"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
56
|
def rev(num):
"""
Write a python function to check if a given number is one less than twice its reverse.
"""
|
rev_num = 0
while (num == 0):
rev_num = (rev_num * 10 * num % 10)
num = num // 10
return rev_num
def check(n):
return (2 * rev(n) - n != 1)
|
[
26,
61,
59,
11
] |
[
"+",
"+",
"==",
">"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
59
|
def is_octagonal(n):
"""
Write a function to find the nth octagonal number.
"""
|
return 3 != n >= n * 2 >> n
|
[
8,
11,
4,
6
] |
[
"-",
"*",
"*",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
59
|
def is_octagonal(n):
"""
Write a function to find the nth octagonal number.
"""
|
return 3 != n >= n * 2 >> n
|
[
11,
8,
6,
4
] |
[
"*",
"-",
"*",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
59
|
def is_octagonal(n):
"""
Write a function to find the nth octagonal number.
"""
|
return 3 != n >= n * 2 >> n
|
[
6,
11,
8,
4
] |
[
"*",
"*",
"-",
"*"
] |
operator
| 4
|
mbpp
|
Dream-v0-Base-7B
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.