description stringlengths 171 4k | code stringlengths 94 3.98k | normalized_code stringlengths 57 4.99k |
|---|---|---|
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | dp = [[(-1) for _ in range(110)] for _ in range(1000)]
def solve(ll, ss, ind=0):
if ind == ll - 1:
if ss == 0 or ss > 9:
return -1, -1
else:
return ss, ss
if dp[ss][ind] != -1:
return dp[ss][ind]
res_min = []
res_max = []
for i in range(10):
... | ASSIGN VAR NUMBER VAR FUNC_CALL VAR NUMBER VAR FUNC_CALL VAR NUMBER FUNC_DEF NUMBER IF VAR BIN_OP VAR NUMBER IF VAR NUMBER VAR NUMBER RETURN NUMBER NUMBER RETURN VAR VAR IF VAR VAR VAR NUMBER RETURN VAR VAR VAR ASSIGN VAR LIST ASSIGN VAR LIST FOR VAR FUNC_CALL VAR NUMBER IF VAR VAR ASSIGN VAR FUNC_CALL VAR VAR BIN_OP V... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split())
if m > 1 and s < 1 or 9 * m < s:
print(-1, -1)
exit()
if s == 0 and m == 1:
print(0, 0)
exit()
k = s
for i in range(m - 1, -1, -1):
a = max(0, k - 9 * i)
if a == 0 and i == m - 1:
a = 1
k -= a
print(a, end="")
print(" ", end="")
for i in range(m -... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER VAR NUMBER BIN_OP NUMBER VAR VAR EXPR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR ASSIGN VAR VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER ASSIGN VAR FUNC_CA... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | d = False
f = False
[a, b] = [int(i) for i in input().split()]
if a == 1 and b == 0:
f = True
ma = [0] * a
if b == 0:
d = True
for i in range(a):
ma[i] = min(9, b)
b = b - ma[i]
if b > 0:
d = True
maa = "".join([str(i) for i in ma])
if ma[-1] == 0:
for i in range(len(ma)):
if ma[i] == 0:... | ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN LIST VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER VAR IF VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR FUNC_CALL VAR NUMBER VAR ASSIGN VAR BIN_OP VAR VAR VAR IF VAR NUMBER... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split())
maxstring = []
if s > m * 9 or s == 0 and m != 1:
print(-1, -1)
elif m == 1 and s == 0:
print(0, 0)
else:
while s > 9:
maxstring.append(9)
s = s - 9
maxstring.append(s)
maximum = maxstring + (m - len(maxstring)) * [0]
minimum = maximum[len(maximum... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST IF VAR BIN_OP VAR NUMBER VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER WHILE VAR NUMBER EXPR FUNC_CALL VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR VAR ASSIGN VAR BIN... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split())
def invstr(s):
return s[::-1]
if s == 0 and m > 1 or s > 9 * m:
print("-1 -1")
elif s == 0 and m == 1:
print("0 0")
else:
min_str = "".join(["9" for i in range((s - 1) // 9)])
if m - len(min_str) == 1:
min_str += str((s - 1) % 9 + 1)
else:
min... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN VAR NUMBER IF VAR NUMBER VAR NUMBER VAR BIN_OP NUMBER VAR EXPR FUNC_CALL VAR STRING IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL STRING STRING VAR FUNC_CALL VAR BIN_OP BIN_OP VAR NUMBER NUMBER IF BIN_OP VAR FUNC_CALL VAR... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = [int(x) for x in input().split()]
if s == 0:
if m == 1:
print(0, 0)
else:
print(-1, -1)
exit(0)
if s > m * 9:
print(-1, -1)
exit(0)
ans = [0] * m
tmp = s
for i in range(m):
add = min(9 - ans[i], tmp)
ans[i] = str(ans[i] + add)
tmp -= add
ans = "".join(ans)
ans2 = [... | ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER IF VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR NUMBER IF VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER VAR ASSIGN VAR VAR FOR VA... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s1 = map(int, input().split())
if s1 == 0 and m == 1:
print("0 0")
elif s1 == 0 or s1 > 9 * m:
print("-1 -1")
else:
l1, l2 = [0] * m, [0] * m
for i in range(m):
if s1 >= 9:
l1[i] = 9
s1 -= 9
else:
l1[i] = s1
break
l2 = l1[::-1]
i... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING IF VAR NUMBER VAR BIN_OP NUMBER VAR EXPR FUNC_CALL VAR STRING ASSIGN VAR VAR BIN_OP LIST NUMBER VAR BIN_OP LIST NUMBER VAR FOR VAR FUNC_CALL VAR VAR IF VAR NUMBER ASSIGN VAR VAR NUMBER VAR NUMBER ASSIGN VAR VAR V... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | n, s = map(int, input().rstrip().split())
def can(m, s):
if s >= 0 and s <= 9 * m:
return True
else:
return False
su = s
s2 = s
minn = ""
maxx = ""
count = 0
for i in range(0, n):
for j in range(0, 10):
if (i > 0 or j > 0 or n == 1 and j == 0) and can(n - 1 - i, su - j):
... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR FUNC_DEF IF VAR NUMBER VAR BIN_OP NUMBER VAR RETURN NUMBER RETURN NUMBER ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR FOR VAR FUNC_CALL VAR NUMBER NUMBER IF VAR NUMBER VAR NUMBER VA... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | def solve(m, s):
if s == 0 and m > 1:
return -1, -1
if s == 0 and m == 1:
return 0, 0
k = ""
nines = "9" * (s // 9)
remaining = str(s % 9)
add = remaining if remaining != "0" else ""
k = nines + add + "0" * (m - len(nines) - len(add))
if len(str(int(k))) != m:
ret... | FUNC_DEF IF VAR NUMBER VAR NUMBER RETURN NUMBER NUMBER IF VAR NUMBER VAR NUMBER RETURN NUMBER NUMBER ASSIGN VAR STRING ASSIGN VAR BIN_OP STRING BIN_OP VAR NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR VAR STRING VAR STRING ASSIGN VAR BIN_OP BIN_OP VAR VAR BIN_OP STRING BIN_OP BIN_OP VAR FUNC_CALL VAR VAR... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split())
if s == 0:
print(["-1 -1", "0 0"][not m - 1])
exit()
if s > m * 9:
print("-1 -1")
exit()
ma = ""
mi = ""
def max(i, j):
global ma
if i < 1:
print(ma, end=" ")
return
if j > 8:
ma += "9"
j -= 9
else:
ma += str(j)
... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER EXPR FUNC_CALL VAR LIST STRING STRING BIN_OP VAR NUMBER EXPR FUNC_CALL VAR IF VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING FUNC_DEF IF VAR NUMBER EXPR FUNC_CALL VAR VAR STRING RETURN IF VAR N... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | n, m = map(int, input().split())
def can_make(n, m):
return m <= n * 9 and m >= 0
def make_min(n, m):
ans = ""
while n > 0:
if ans or n == 1:
start = 0
else:
start = 1
made = False
for i in range(start, 10):
if can_make(n - 1, m - i):
... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN VAR BIN_OP VAR NUMBER VAR NUMBER FUNC_DEF ASSIGN VAR STRING WHILE VAR NUMBER IF VAR VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR BIN_OP VAR NUMBER BIN_OP VAR VAR VAR FUNC_CALL V... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | n, s = map(int, input().split())
top = ""
if s > 9 * n or s == 0 and n > 1:
print(-1, -1)
else:
a = s
for i in range(n - 1, -1, -1):
num = max(0, a - 9 * i)
if a > 0 and i == n - 1 and num == 0:
num = 1
top += str(num)
a -= num
a = s
top += " "
for i i... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR STRING IF VAR BIN_OP NUMBER VAR VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER ASSIGN VAR VAR FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR NUMBER BIN_OP VAR BIN_OP NUMBER VAR IF VAR NUMBER VAR BIN_OP VAR NUMBER... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = [int(n) for n in input().rstrip().split(" ")]
small = 0
s_s = s - 1
for i in range(m):
d = 9 if s_s >= 9 else s_s
s_s -= d
if i == m - 1:
d += 1
small = small + 10**i * d
large = 0
s_l = s
for _ in range(m):
d = 9 if s_l >= 9 else s_l
s_l -= d
large = large * 10 + d
ans1 = sma... | ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR NUMBER NUMBER VAR VAR VAR IF VAR BIN_OP VAR NUMBER VAR NUMBER ASSIGN VAR BIN_OP VAR BIN_OP BIN_OP NUMBER VAR VAR ASSIGN VAR NUMBER ASSIGN VAR VAR FOR VAR ... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = [int(x) for x in input().split()]
def func(m, s):
if s == 0 and m == 1:
print("0 0")
return
if s == 0 or s > m * 9:
print("-1 -1")
return
a = [0] * m
j = m - 1
sumx = s
while sumx > 0:
if sumx > 9:
sumx -= 9
a[j] = 9
... | ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING RETURN IF VAR NUMBER VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR STRING RETURN ASSIGN VAR BIN_OP LIST NUMBER VAR ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR VAR WHILE VAR NUMBER IF VAR NUMBER VAR NUMBER ASS... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | inpu = input().split()
length = int(inpu[0])
sum = int(inpu[1])
if length == 1 and sum == 0:
print("0 0")
elif length * sum == 0 or sum / length > 9:
print("-1 -1")
else:
small = 1 * 10 ** (length - 1)
sumt = sum - 1
for i in range(length):
if sumt > 9:
small += 9 * 10**i
... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR NUMBER IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING IF BIN_OP VAR VAR NUMBER BIN_OP VAR VAR NUMBER EXPR FUNC_CALL VAR STRING ASSIGN VAR BIN_OP NUMBER BIN_OP NUMBER BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER FOR... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split())
if s == 0 and m > 1:
print(-1, -1)
elif s > m * 9:
print(-1, -1)
elif s % 9 == 0 and m > 1:
x = "9" * (s // 9)
if m - s // 9 >= 1:
d = "8"
x = "1"
y = "9" * (s // 9 - 1)
z = m - (s // 9 + 1)
min = x + "0" * z + d + y
max = ... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER IF VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER IF BIN_OP VAR NUMBER NUMBER VAR NUMBER ASSIGN VAR BIN_OP STRING BIN_OP VAR NUMBER IF BIN_OP VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR STRING ASSIGN V... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = list(map(int, input().split()))
if s == 0 and m == 1:
print(0, 0)
elif s > 9 * m or s == 0:
print(-1, -1)
else:
large = []
temp = 0
while temp + 9 < s:
temp += 9
large.append("9")
remain = s - temp
large.append(str(remain))
while len(large) != m:
large.appe... | ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER IF VAR BIN_OP NUMBER VAR VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER ASSIGN VAR LIST ASSIGN VAR NUMBER WHILE BIN_OP VAR NUMBER VAR VAR NUMBER EXPR FUNC_CALL VAR STRING ASSIGN VAR BIN_OP VAR V... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split())
ss = s
l = [0] * m
l[0] = 1
s -= 1
for i in range(m - 1, 0, -1):
if s >= 9:
l[i] = 9
s -= 9
else:
l[i] = s
s = 0
minn = 0
if s >= 9 or ss == 0 and m != 1:
print(-1, -1)
else:
l[0] += s
for i in l:
minn += i
minn *= 10
... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR ASSIGN VAR BIN_OP LIST NUMBER VAR ASSIGN VAR NUMBER NUMBER VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER NUMBER NUMBER IF VAR NUMBER ASSIGN VAR VAR NUMBER VAR NUMBER ASSIGN VAR VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER VAR NUMB... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split())
sum = s
mus = m
sum_m = s
ans_min = ""
ans_max = ""
while mus != 0:
min_d = 0
if ans_min == "":
min_d = 1
ost = max(sum_m - 9 * (mus - 1), 0)
cur_d = max(min_d, ost)
ans_min += str(cur_d)
sum_m -= cur_d
if sum >= 9:
ans_max += "9"
sum ... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR STRING ASSIGN VAR STRING WHILE VAR NUMBER ASSIGN VAR NUMBER IF VAR STRING ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP VAR BIN_OP NUMBER BIN_OP VAR NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR VAR VAR VAR FUN... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | x = input().split()
a = int(x[0])
b = int(x[1])
if b == 0 or 9 * a < b:
if a == 1 and b == 0:
print("0 0")
else:
print("-1 -1")
else:
s = int(b / 9)
y = b % 9
maax = ""
maax = maax + s * "9"
if y > 0:
maax = maax + str(y)
k = a - len(maax)
maax = maax + k * "0... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR NUMBER IF VAR NUMBER BIN_OP NUMBER VAR VAR IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR STRING ASSIGN VAR... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | dlug, suma = map(int, input().split())
wynik_min, wynik_max = ["1"] + ["0"] * (dlug - 1), ""
if wynik_min == ["1"]:
wynik_min = ["0"]
if dlug == 0 or suma == 0 and dlug > 1:
print(-1, -1)
elif suma > dlug * 9:
print(-1, -1)
else:
x = 0
kop_suma = suma
while True:
if x == dlug:
... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR BIN_OP LIST STRING BIN_OP LIST STRING BIN_OP VAR NUMBER STRING IF VAR LIST STRING ASSIGN VAR LIST STRING IF VAR NUMBER VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER IF VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER ASSIGN VAR NUMBE... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | lensum = input().split()
Len_max, Sum_max = int(lensum[0]), int(lensum[1])
Len_min, Sum_min = int(lensum[0]), int(lensum[1])
max_output = ""
min_output = ""
if Sum_max == 0 and Len_max > 1 or Sum_max > 9 * Len_max:
print("-1 -1")
else:
for i in range(Len_max):
max_output += str(min([9, Sum_max]))
... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER ASSIGN VAR VAR FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER ASSIGN VAR STRING ASSIGN VAR STRING IF VAR NUMBER VAR NUMBER VAR BIN_OP NUMBER VAR EXPR FUNC_CALL VAR STRING FOR VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR FU... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | n, s = map(int, input().split())
if s == 0 and n != 1 or s > 9 * n:
print(-1, -1)
elif s < 10:
if n == 1:
print(s, s)
else:
print(1, end="")
for i in range(n - 2):
print(0, end="")
print(s - 1, end=" ")
print(s, end="")
for i in range(n - 1):
... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER VAR NUMBER VAR BIN_OP NUMBER VAR EXPR FUNC_CALL VAR NUMBER NUMBER IF VAR NUMBER IF VAR NUMBER EXPR FUNC_CALL VAR VAR VAR EXPR FUNC_CALL VAR NUMBER STRING FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR NUMBER STRING EXPR FUNC_CALL VAR BIN... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split(" "))
if s == 0 and m != 1 or s > 9 * m:
print("-1 -1")
elif m == 1:
print(s, s)
else:
ma = []
for i in range(m):
if s > 9:
ma.append("9")
s -= 9
else:
ma.append(str(s))
s -= s
mx = "".join(ma)
ma.rever... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR STRING IF VAR NUMBER VAR NUMBER VAR BIN_OP NUMBER VAR EXPR FUNC_CALL VAR STRING IF VAR NUMBER EXPR FUNC_CALL VAR VAR VAR ASSIGN VAR LIST FOR VAR FUNC_CALL VAR VAR IF VAR NUMBER EXPR FUNC_CALL VAR STRING VAR NUMBER EXPR FUNC_CALL VAR FUNC_CALL VAR VAR VAR VAR ASSI... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | a, b = map(int, input().split())
c = a
d = b
e = b
f = ""
g = ""
h = ""
if 9 * a < b:
print("-1 -1")
exit()
if a > 1 and b == 0:
print("-1 -1")
exit()
if a == 1 and b == 0:
print("0 0")
exit()
while c > 0:
if d >= 9:
f = f + "9"
d = d - 9
else:
f = f + str(d)
... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR STRING IF BIN_OP NUMBER VAR VAR EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CALL VAR IF VAR NUMBER VAR NUMBER... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | def findLargest(s, level, m, res):
if level == m:
return res
for i in range(9, -1, -1):
if s - i >= 0:
res = res + str(i)
res = findLargest(s - i, level + 1, m, res)
break
return res
m, s = list(map(int, input().split()))
max_s = pow(10, m) - 1
max_s = s... | FUNC_DEF IF VAR VAR RETURN VAR FOR VAR FUNC_CALL VAR NUMBER NUMBER NUMBER IF BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR BIN_OP VAR VAR BIN_OP VAR NUMBER VAR VAR RETURN VAR ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR BIN_OP FUNC_CALL VAR N... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = input().split()
m = int(m)
s = int(s)
if s == 0:
if m == 1:
min = 0
max = 0
else:
max = -1
min = -1
elif s > 9 * m:
max = -1
min = -1
elif s < 10:
max = s * 10 ** (m - 1)
min = 10 ** (m - 1) + s - 1
elif s == 9 * m:
max = 10**m - 1
min = 10**m - 1
e... | ASSIGN VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR IF VAR NUMBER IF VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF VAR BIN_OP NUMBER VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER ASSIGN VAR BIN_OP VAR BIN_OP NUMBER BIN_OP VAR N... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | n, s = map(int, input().split())
if n == 1:
if len(str(s)) == 1:
print(s, s)
exit()
if s > n * 9 or s == 0:
print(-1, -1)
exit()
ansmax = ""
stemp = s
while stemp - 9 > 0:
ansmax += "9"
stemp -= 9
if stemp > 0:
ansmax += str(stemp)
while len(ansmax) < n:
ansmax += "0"
ansmin ... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER IF FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR VAR VAR EXPR FUNC_CALL VAR IF VAR BIN_OP VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR VAR WHILE BIN_OP VAR NUMBER NUMBER VAR STRIN... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split())
if s == 0:
if m == 1:
print(0, 0)
else:
print(-1, -1)
exit()
if 9 * m < s:
print(-1, -1)
exit()
if s % 9:
a = "9" * (s // 9) + str(s % 9) + "0" * (m - s // 9 - 1)
else:
a = "9" * (s // 9) + "0" * (m - s // 9)
l = a
while l[-1] == "0":
l = ... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER IF VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR IF BIN_OP NUMBER VAR VAR EXPR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR IF BIN_OP VAR NUMBER ASSIGN VAR BIN_OP BIN_OP BIN_OP STRING BIN_OP VAR NU... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = list(map(int, input().split()))
ans_min = ""
ans_max = ""
if s == 0 and m > 1 or s > m * 9:
print(-1, -1)
elif m == 1 and s == 0:
print(0, 0)
else:
mark_value = s
mark_length = m - 2
i = 1
while len(ans_min) < 1:
if (m - 1) * 9 + i >= s:
ans_min += str(i)
m... | ASSIGN VAR VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING IF VAR NUMBER VAR NUMBER VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER ASSIGN VAR VAR ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER WHILE FUNC_CA... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | a = list(map(int, input().split()))
m = a[0]
s = a[1]
def f(m, s):
MAX = ""
for i in range(0, m):
t = min(9, s)
MAX += str(t)
s -= t
return MAX
def g(m, s):
MIN = ""
for k in range(1, 10):
if k + 9 * (m - 1) >= s:
MIN += str(k)
break
b ... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR NUMBER ASSIGN VAR VAR NUMBER FUNC_DEF ASSIGN VAR STRING FOR VAR FUNC_CALL VAR NUMBER VAR ASSIGN VAR FUNC_CALL VAR NUMBER VAR VAR FUNC_CALL VAR VAR VAR VAR RETURN VAR FUNC_DEF ASSIGN VAR STRING FOR VAR FUNC_CALL VAR NUMBER NUMBER IF BIN_OP... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = [int(i) for i in input().split()]
if (s == 0) & (m == 1):
print("0 0")
elif s == 0 or s > 9 * m:
print("-1 -1")
else:
pass
Max, Min = [], []
smax, smin = s, s
for i in range(m):
if i == 0:
Min.append(
str(smin - 9 * (m - i - 1)) if smin - 9 * (m - i - 1... | ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR IF BIN_OP VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING IF VAR NUMBER VAR BIN_OP NUMBER VAR EXPR FUNC_CALL VAR STRING ASSIGN VAR VAR LIST LIST ASSIGN VAR VAR VAR VAR FOR VAR FUNC_CALL VAR VAR IF VAR NUMBER EXPR FUNC_CALL VAR BIN_OP VAR BIN_OP NUMBER BIN_OP ... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split())
if m > 1 and s == 0 or s > 9 * m:
print("-1 -1")
elif m == 1 and s == 0:
print("0 0")
else:
arr = []
while len(arr) != m:
arr.append(min(9, s))
s -= min(9, s)
st = "".join(map(str, arr))
rst = arr[::-1]
if rst[0] == 0:
rst[0] = 1
... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER VAR NUMBER VAR BIN_OP NUMBER VAR EXPR FUNC_CALL VAR STRING IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING ASSIGN VAR LIST WHILE FUNC_CALL VAR VAR VAR EXPR FUNC_CALL VAR FUNC_CALL VAR NUMBER VAR VAR FUNC_CALL VAR NUMBER VAR ASSIGN VAR FUNC_CALL S... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = [int(i) for i in input().split()]
if m * 9 < s or s == 0 and m != 1:
x = -1
else:
z = s // 9
b = s % 9
x = ""
x += z * "9"
if b != 0:
x += str(b)
z += 1
x += (m - z) * "0"
if x == -1:
y = -1
elif m == 1 and s == 0:
y = 0
else:
y = 0
ma = 0
for i in ... | ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR IF BIN_OP VAR NUMBER VAR VAR NUMBER VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR STRING VAR BIN_OP VAR STRING IF VAR NUMBER VAR FUNC_CALL VAR VAR VAR NUMBER VAR BIN_OP BIN_OP VAR VAR STRING IF VAR NUMBER AS... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | n, s = map(int, input().split())
if s == 0 and n > 1 or s > 9 * n:
print("-1 -1")
elif s == 0 and n == 1:
print("0 0")
else:
l = ""
min = ""
k = s
for _ in range(n):
if k > 9:
l += str(9)
k = k - 9
else:
l += str(k % 10)
k = k - k %... | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR NUMBER VAR NUMBER VAR BIN_OP NUMBER VAR EXPR FUNC_CALL VAR STRING IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR VAR FOR VAR FUNC_CALL VAR VAR IF VAR NUMBER VAR FUNC_CALL VAR NUMBER ASSIGN VAR BIN_OP VAR N... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = [int(x) for x in input().split()]
if s > 9 * m:
print("-1 -1")
elif s == 0 and m != 1:
print("-1 -1")
else:
L = []
for i in range(0, m):
k = 9
while s - k < 0:
k = k - 1
if k == 0:
break
K = str(k)
L.append(K)
s = s -... | ASSIGN VAR VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR IF VAR BIN_OP NUMBER VAR EXPR FUNC_CALL VAR STRING IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING ASSIGN VAR LIST FOR VAR FUNC_CALL VAR NUMBER VAR ASSIGN VAR NUMBER WHILE BIN_OP VAR VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER IF VAR NUMBER ASSIGN VAR FUNC_CAL... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | a = input().split()
m = int(a[0])
s = int(a[1])
def max(m, s):
if s > 9 * m:
return "-1"
elif s == 0 and m == 1:
return "0"
elif s == 0 and m > 1:
return "-1"
else:
digits = []
while s >= 9:
digits.append("9")
s -= 9
m -= 1
... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR NUMBER FUNC_DEF IF VAR BIN_OP NUMBER VAR RETURN STRING IF VAR NUMBER VAR NUMBER RETURN STRING IF VAR NUMBER VAR NUMBER RETURN STRING ASSIGN VAR LIST WHILE VAR NUMBER EXPR FUNC_CALL VAR STRING VAR NUMBER VAR NUMBER WHILE ... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | line = input()
tokens = line.split()
m, s = int(tokens[0]), int(tokens[1])
if m == 1 and s <= 9:
print(s, s)
exit(0)
if s == 0 or s > m * 9:
print(-1, -1)
exit(0)
min_val = ""
ds = s
for i in range(m):
d = max(0, ds - 9 * (m - i - 1))
if i == 0:
d = max(1, d)
min_val += str(d)
ds... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR ASSIGN VAR VAR FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR VAR VAR EXPR FUNC_CALL VAR NUMBER IF VAR NUMBER VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR NUMBER NUMBER EXPR FUNC_CALL VAR NUMBER ASSIGN VAR STRING ASSIGN VAR VAR... |
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
-----Input-----
The single line of the input co... | m, s = map(int, input().split())
def g(s):
a = ""
for i in range(m):
v = min(9, s)
a += str(v)
s -= v
return a
a = g(s)
if s < 1:
print(-(m > 1), -(m > 1))
elif 9 * m < s:
print(-1, -1)
else:
print(a[::-1] if a[-1] > "0" else "1" + g(s - 1)[-2::-1], a) | ASSIGN VAR VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF ASSIGN VAR STRING FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR NUMBER VAR VAR FUNC_CALL VAR VAR VAR VAR RETURN VAR ASSIGN VAR FUNC_CALL VAR VAR IF VAR NUMBER EXPR FUNC_CALL VAR VAR NUMBER VAR NUMBER IF BIN_OP NUMBER VAR VAR EXPR FUNC_CALL VAR NUMBE... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
d = ["a", "e", "i", "o", "u"]
st = []
for i in range(len(s)):
if s[i] in d:
st = []
print(s[i], end="")
continue
st.append(s[i])
if st == [s[i], s[i], s[i]]:
st = st[1:]
print(s[i], end="")
elif len(st) == 3:
st = [s[i]]
print(" " + s[i... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR LIST FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR ASSIGN VAR LIST EXPR FUNC_CALL VAR VAR VAR STRING EXPR FUNC_CALL VAR VAR VAR IF VAR LIST VAR VAR VAR VAR VAR VAR ASSIGN VAR VAR NUMBER EXPR FUNC_CALL VAR VAR VAR STRING IF F... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
n = len(s)
vowels = ["a", "e", "i", "o", "u"]
if n < 3:
print(s)
exit()
dp = s[:2]
for i in range(2, n):
x = s[i]
if x in vowels:
dp += x
elif dp[-1] == dp[-2] == x:
dp += x
elif (
(dp[-1] != " " and dp[-2] != " ")
and dp[-1] not in vowels
and ... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING IF VAR NUMBER EXPR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR ASSIGN VAR VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR ASSIGN VAR VAR VAR IF VAR VAR VAR VAR IF VAR NUMBER VAR NUMBER VAR VAR VAR IF VAR NUMBER STRING VAR NUMB... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | a = input()
gl = "aeiou"
las = 0
i = 0
while i < len(a) - 2:
i += 1
if a[i - 1] == a[i] and a[i] == a[i + 1]:
continue
if a[i] in gl or a[i - 1] in gl or a[i + 1] in gl:
continue
i += 1
print(a[las:i])
las = i
print(a[las : len(a)]) | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER VAR NUMBER IF VAR BIN_OP VAR NUMBER VAR VAR VAR VAR VAR BIN_OP VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR NUMBER EXPR FUNC_CALL VAR VAR VAR VAR ASSIGN VAR VAR E... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | def findO(s):
glas = {"a", "e", "i", "o", "u"}
i = 0
while i < len(s) - 2:
newSet = {s[i], s[i + 1], s[i + 2]}
if len(newSet & glas) == 0 and not s[i] == s[i + 1] == s[i + 2]:
s1 = s[: i + 2]
s2 = s[i + 2 :]
s = s1 + " " + s2
i += 3
els... | FUNC_DEF ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER IF FUNC_CALL VAR BIN_OP VAR VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR VAR BIN_OP VAR NUMBER ASSIGN VAR VAR BIN... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | string = input()
good = "aeiou"
last = 0
a = ""
bad = ""
i = 0
while i <= len(string) - 1:
if good.find(string[i]) >= 0:
a += bad
bad = ""
a += string[i]
i += 1
else:
bad += string[i]
if len(bad) >= 3:
if bad == bad[0] * 3:
a += bad[0]
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR VAR NUMBER VAR VAR ASSIGN VAR STRING VAR VAR VAR VAR NUMBER VAR VAR VAR IF FUNC_CALL VAR VAR NUMBER IF VAR BIN_OP VAR NUMBER NUMBER VAR VAR NU... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | def is_consonants(ch):
if ch == "e" or ch == "a" or ch == "o" or ch == "i" or ch == "u":
return 0
else:
return 1
inputs = input()
l = len(inputs)
if l < 3:
print(inputs)
exit()
i = 1
j = 1
arr = list(" " * l * 2)
arr[0] = inputs[0]
for cc in inputs:
if (
i + 1 != l
... | FUNC_DEF IF VAR STRING VAR STRING VAR STRING VAR STRING VAR STRING RETURN NUMBER RETURN NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR IF VAR NUMBER EXPR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR BIN_OP BIN_OP STRING VAR NUMBER ASSIGN VAR NUMBER VAR ... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | line = input()
sog = [
"b",
"c",
"d",
"f",
"g",
"h",
"j",
"k",
"l",
"m",
"n",
"p",
"q",
"r",
"s",
"t",
"v",
"w",
"x",
"y",
"z",
]
past_symbol = ""
line_out = ""
for n in range(len(line)):
symbol = line[n]
if symbol in sog:
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING ASSIGN VAR STRING ASSIGN VAR STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR IF VAR VAR IF FUNC_CALL VAR VAR NUMBE... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | vowels = {"a", "e", "i", "o", "u"}
def longestValidBlock(word, startPos):
lastCons = dict()
for i in range(startPos, len(word)):
if word[i] in vowels:
lastCons = dict()
else:
lastCons.setdefault(word[i], 0)
lastCons[word[i]] += 1
s = sum(v for k,... | ASSIGN VAR STRING STRING STRING STRING STRING FUNC_DEF ASSIGN VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR IF VAR VAR VAR ASSIGN VAR FUNC_CALL VAR EXPR FUNC_CALL VAR VAR VAR NUMBER VAR VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR VAR VAR FUNC_CALL VAR IF VAR NUMBER FUNC_CALL VAR VAR NUMBER RETURN VAR RE... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
gl = ["a", "e", "i", "o", "u"]
i = 0
s1 = ""
while i < len(s) - 2:
if s[i] in gl:
s1 += s[i]
i += 1
continue
elif s[i + 2] in gl:
s1 += s[i : i + 3]
i += 3
continue
elif s[i + 1] in gl:
s1 += s[i : i + 2]
i += 2
continue
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR STRING WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR VAR VAR VAR VAR VAR VAR NUMBER IF VAR BIN_OP VAR NUMBER VAR VAR VAR VAR BIN_OP VAR NUMBER VAR NUMBER IF VAR BIN_OP VAR NUMBER VAR VAR VAR VAR BIN_OP VAR NUMBER... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
vowels = {"a", "e", "i", "u", "o"}
def will_divide(x):
for l in x:
if l in vowels:
return False
if len(set(x)) == 1:
return False
return True
space_positions = []
space_positions_set = set()
i = 2
while i < len(s):
if not space_positions_set.intersection({i - ... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING STRING STRING STRING STRING FUNC_DEF FOR VAR VAR IF VAR VAR RETURN NUMBER IF FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER RETURN NUMBER RETURN NUMBER ASSIGN VAR LIST ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF FUNC_CALL VAR BIN_OP VAR NUMBER VAR IF FUNC... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | a = input()
x = 2
while x < len(a):
if (
a[x] != "a"
and a[x] != "e"
and a[x] != "i"
and a[x] != "o"
and a[x] != "u"
and a[x] != " "
):
if (
a[x - 1] != "a"
and a[x - 1] != "e"
and a[x - 1] != "i"
and a[x - 1... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING IF VAR BIN_OP VAR NUMBER STRING VAR BIN_OP VAR NUMBER STRING VAR BIN_OP VAR NUMBER STRING VAR BIN_OP VAR NUMBER STRING VAR BIN_OP VAR NUMBER STRING VAR BIN_... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | line = input()
line = list(line)
sogl = ["a", "e", "u", "o", "i"]
res = []
k = [0, 0, 0]
for i in range(0, len(line)):
if line[i] not in sogl:
if k[1] != 0:
if line[i] != k[1]:
k[0] += 1
k[1] = line[i]
k[2] += 1
else:
k[... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR LIST ASSIGN VAR LIST NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR IF VAR VAR VAR IF VAR NUMBER NUMBER IF VAR VAR VAR NUMBER VAR NUMBER NUMBER ASSIGN VAR NUMBER VAR VAR VAR NUMBER NU... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | d = input()
vowels = ["a", "e", "i", "o", "u"]
h = 0
sy = ""
res = []
tt = False
es = ""
for v in d:
if not v in vowels:
h += 1
if es != v and es != "":
tt = True
else:
h = 0
es = ""
tt = False
if h >= 3:
if tt:
res.append(sy)
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR LIST ASSIGN VAR NUMBER ASSIGN VAR STRING FOR VAR VAR IF VAR VAR VAR NUMBER IF VAR VAR VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR NUMBER IF VAR NUMBER IF VAR EXPR FU... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | vow = ["a", "e", "i", "o", "u"]
str = input()
i = 0
while True:
if i + 3 > len(str):
break
found = True
for j in range(i, i + 3):
if str[j] in vow:
found = False
break
if found:
if str[i] != str[i + 1] or str[i] != str[i + 2]:
str = str[0 : i +... | ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER WHILE NUMBER IF BIN_OP VAR NUMBER FUNC_CALL VAR VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR BIN_OP VAR NUMBER IF VAR VAR VAR ASSIGN VAR NUMBER IF VAR IF VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER ASSIGN VA... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | array = list(input())
out = array[:]
three = ""
vovels = ["a", "e", "i", "o", "u"]
c = 0
for i in range(len(array)):
h = True
if array[i] in vovels:
three = ""
else:
three += str(array[i])
if len(three) == 3 and three.count(three[0]) != 3:
out.insert(i + c, " ")
c += 1
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR ASSIGN VAR STRING ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER IF VAR VAR VAR ASSIGN VAR STRING VAR FUNC_CALL VAR VAR VAR IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER NUMBER EX... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input().lower()
notypos = s[0]
vog = "aeiou "
last = ""
for i in range(1, len(s)):
if s[i] not in vog:
if i < len(s) - 1 and notypos[-1] not in vog and s[i + 1] not in vog:
if s[i] != notypos[-1] or s[i] != s[i + 1]:
notypos += s[i] + " "
else:
not... | ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR VAR NUMBER ASSIGN VAR STRING ASSIGN VAR STRING FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR IF VAR VAR VAR IF VAR BIN_OP FUNC_CALL VAR VAR NUMBER VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR IF VAR VAR VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR VAR STRING VAR VAR... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | n = input()
l = 0
q = len(n)
sogl = [
"q",
"w",
"r",
"t",
"y",
"p",
"s",
"d",
"f",
"g",
"h",
"j",
"k",
"l",
"z",
"x",
"c",
"v",
"b",
"n",
"m",
]
for i in range(1, len(n) - 1):
if (
(n[i - 1] != n[i + 1] or n[i] != n[i - 1] a... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR BIN_OP VAR NUMBER... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | m = input()
p = " "
n = 1
b = 0
m = m + " "
for i in range(0, 3001):
if m[i] == " ":
break
if m[i] == "a" or m[i] == "e" or m[i] == "i" or m[i] == "o" or m[i] == "u":
print(m[i], sep="", end="")
b = 0
else:
b = b + 1
if p == m[i]:
n = n + 1
else:
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR STRING FOR VAR FUNC_CALL VAR NUMBER NUMBER IF VAR VAR STRING IF VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING EXPR FUNC_CALL VAR VAR VAR STRING STRING ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
g = {"a", "e", "i", "o", "u"}
l = 0
lc1 = ""
lc2 = ""
for ch in s:
if ch not in g:
l += 1
else:
l = 0
if l > 2 and not ch == lc1 == lc2:
print(" ", end="")
l = 1
lc2 = lc1
lc1 = ch
print(ch, end="") | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR STRING FOR VAR VAR IF VAR VAR VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER VAR VAR VAR EXPR FUNC_CALL VAR STRING STRING ASSIGN VAR NUMBER ASSIGN VAR VAR ASSIGN VAR VAR EXPR FUNC_CALL VAR VAR STRING |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
s2 = s1 = ""
l1 = {"a", "e", "i", "o", "u"}
k = 0
for i in range(len(s)):
if s[i] not in l1:
if k == 2:
if s[i] != s[i - 1] or s[i - 1] != s[i - 2]:
print(s1 + " ", end="", sep="")
s1 = s[i]
k = 1
else:
s1 +=... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR VAR STRING ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR IF VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR BIN_OP VAR STRING STRING STRING ASSIGN VAR V... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
vov = ["a", "e", "i", "o", "u"]
n = len(s)
c = 0
tmp = []
ans = []
for i in range(n):
if s[i] not in vov:
c += 1
tmp.append(s[i])
else:
c = 0
tmp.append(s[i])
if c >= 3 and (tmp[-2] != s[i] or tmp[-3] != s[i]):
ans.append("".join(tmp[:-1]))
tmp = [... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR LIST ASSIGN VAR LIST FOR VAR FUNC_CALL VAR VAR IF VAR VAR VAR VAR NUMBER EXPR FUNC_CALL VAR VAR VAR ASSIGN VAR NUMBER EXPR FUNC_CALL VAR VAR VAR IF VAR NUMBER VAR NUMBER VAR VAR VAR NUMB... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | g = "aeiou"
s = input()
l = []
for i in s:
if i in g:
l = []
else:
l.append(i)
if len(l) > 2 and len(set(l)) != 1:
print(" ", end="")
l = [i]
print(i, end="") | ASSIGN VAR STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST FOR VAR VAR IF VAR VAR ASSIGN VAR LIST EXPR FUNC_CALL VAR VAR IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING STRING ASSIGN VAR LIST VAR EXPR FUNC_CALL VAR VAR STRING |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | n = input()
answ = [n]
buff = ["a", "e", "i", "o", "u"]
flag = 0
pred = ""
for i in range(len(n)):
if not n[i] in buff:
pred += n[i]
else:
pred = ""
if len(pred) >= 3 and pred.count(pred[0]) != len(pred):
f = answ.pop()
k = i - len(n) + len(f)
answ.append(f[:k])
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR VAR VAR VAR ASSIGN VAR STRING IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR ASSIGN ... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
vowels = set(list("aeiou"))
chars = ""
for i in range(len(s)):
if s[i] not in vowels:
if len(chars) == 2:
if s[i] not in chars or s[i] in chars and chars[0] != chars[1]:
print(" ", end="")
chars = s[i]
else:
chars += s[i]
else:
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR STRING ASSIGN VAR STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR IF FUNC_CALL VAR VAR NUMBER IF VAR VAR VAR VAR VAR VAR VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING STRING ASSIGN VAR VAR VAR VAR VAR VAR ASSIGN VAR STRING EXPR FUNC_CALL VA... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | vowels = ["a", "e", "i", "o", "u"]
def is_consonant(c):
return vowels.count(c) == 0
def is_typo(s):
if s[0] == s[1] and s[1] == s[2]:
return False
elif is_consonant(s[0]) and is_consonant(s[1]) and is_consonant(s[2]):
return True
else:
return False
def solve(s):
i = 0
... | ASSIGN VAR LIST STRING STRING STRING STRING STRING FUNC_DEF RETURN FUNC_CALL VAR VAR NUMBER FUNC_DEF IF VAR NUMBER VAR NUMBER VAR NUMBER VAR NUMBER RETURN NUMBER IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER RETURN NUMBER RETURN NUMBER FUNC_DEF ASSIGN VAR NUMBER ASSIGN VAR LIST WHILE VAR... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
st = {"a", "e", "i", "o", "u", " "}
res = ""
def check(s):
if len(s) < 3:
return True
if (s[-1] not in st and s[-2] not in st and s[-3] not in st) and (
s[-1] != s[-2] or s[-2] != s[-3] or s[-1] != s[-3]
):
return False
return True
for item in s:
if not check(... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING STRING STRING STRING STRING STRING ASSIGN VAR STRING FUNC_DEF IF FUNC_CALL VAR VAR NUMBER RETURN NUMBER IF VAR NUMBER VAR VAR NUMBER VAR VAR NUMBER VAR VAR NUMBER VAR NUMBER VAR NUMBER VAR NUMBER VAR NUMBER VAR NUMBER RETURN NUMBER RETURN NUMBER FOR VAR VAR IF FUNC_CALL VAR BI... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
if len(s) < 3:
print(s)
exit(0)
answ = s[0] + ""
g = ["a", "e", "i", "o", "u"]
test = False
for i in range(1, len(s) - 1):
if test:
test = False
answ += s[i]
continue
a = s[i - 1]
b = s[i]
c = s[i + 1]
answ += b
if not a in g and (a != b or c != b) and... | ASSIGN VAR FUNC_CALL VAR IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER STRING ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR ASSIGN VAR NUMBER VAR VAR VAR ASSIGN VAR VAR ... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
l = "aeiou"
i = 2
while i < len(s):
if (
(s[i] != s[i - 1] or s[i] != s[i - 2] or s[i - 1] != s[i - 2])
and s[i] not in l
and s[i - 1] not in l
and s[i - 2] not in l
):
s = s[:i] + " " + s[i:]
i += 2
i += 1
print(s) | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR STRING VAR VAR VAR NUMBER V... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | a = [str(i) for i in input()]
c = ["a", "e", "i", "o", "u"]
b = []
y = 0
i = 0
while i < len(a):
if not a[i] in c:
b.append(a[i])
else:
b = []
if len(b) == 3:
for j in range(len(b) - 1):
if b[j] != b[j + 1]:
y = 1
b = []
bre... | ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR LIST ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF VAR VAR VAR EXPR FUNC_CALL VAR VAR VAR ASSIGN VAR LIST IF FUNC_CALL VAR VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | vowels = ["a", "e", "i", "o", "u"]
def skip_vowels(s, i):
while i < len(s) and s[i] in vowels:
i = i + 1
return i
ss = input()
pre, cur = 0, 0
ans = []
while cur < len(ss):
cur = skip_vowels(ss, cur)
flag = 0
while cur + 1 < len(ss) and ss[cur] == ss[cur + 1]:
cur = cur + 1
... | ASSIGN VAR LIST STRING STRING STRING STRING STRING FUNC_DEF WHILE VAR FUNC_CALL VAR VAR VAR VAR VAR ASSIGN VAR BIN_OP VAR NUMBER RETURN VAR ASSIGN VAR FUNC_CALL VAR ASSIGN VAR VAR NUMBER NUMBER ASSIGN VAR LIST WHILE VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR VAR VAR ASSIGN VAR NUMBER WHILE BIN_OP VAR NUMBER FUNC_CA... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | def check3x(s):
if s == s[0] * len(s) or len(s) < 3:
return True
return False
s = input()
c = ""
a = s
k = 0
for i in range(len(s)):
if s[i] in "uioea":
c = ""
continue
c += s[i]
if not check3x(c) and c in a:
x = i + k
k += 1
a = a[:x] + " " + a[x:]
... | FUNC_DEF IF VAR BIN_OP VAR NUMBER FUNC_CALL VAR VAR FUNC_CALL VAR VAR NUMBER RETURN NUMBER RETURN NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR STRING ASSIGN VAR STRING VAR VAR VAR IF FUNC_CALL VAR VAR VAR VAR ASSIGN VAR BIN_OP VAR ... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | a = input()
n = len(a)
sogl = {
"b",
"c",
"d",
"f",
"g",
"h",
"j",
"k",
"l",
"m",
"n",
"p",
"q",
"r",
"s",
"t",
"v",
"w",
"x",
"y",
"z",
}
gl = {"a", "e", "i", "o", "u"}
assert len(sogl) + len(gl) == 26
bd = []
for i in range(n - 2):
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING STRING ASSIGN VAR STRING STRING STRING STRING STRING BIN_OP FUNC_CALL VAR VAR FUNC_CALL VAR VAR NUMBER ASSIGN VAR L... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
res = ""
l = 0
for ch in s:
if ch in "aeiou":
res += ch
l = 0
elif l >= 2 and (ch != res[-l] or ch != res[-l + 1]):
res += " " + ch
l = 1
else:
res += ch
l += 1
print(res) | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER FOR VAR VAR IF VAR STRING VAR VAR ASSIGN VAR NUMBER IF VAR NUMBER VAR VAR VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP STRING VAR ASSIGN VAR NUMBER VAR VAR VAR NUMBER EXPR FUNC_CALL VAR VAR |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | a = input()
k = 0
S = ""
i = 0
while i != len(a):
if a[i] != "a" and a[i] != "e" and a[i] != "i" and a[i] != "o" and a[i] != "u":
if i + 2 < len(a):
if (
a[i + 1] != "a"
and a[i + 1] != "e"
and a[i + 1] != "i"
and a[i + 1] != "o"
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING IF BIN_OP VAR NUMBER FUNC_CALL VAR VAR IF VAR BIN_OP VAR NUMBER STRING VAR BIN_OP VAR NUMBER STRING VAR BIN_OP VAR NUMBER STRING VAR BI... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | vowel = ["a", "e", "i", "o", "u"]
st = input()
num = 0
same_let = 0
last_let = ""
for ch in st:
if ch in vowel:
num = 0
same_let = 0
let = ""
print(ch, end="")
else:
num += 1
if ch == last_let or last_let == "":
last_let = ch
same_let += 1
... | ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR STRING FOR VAR VAR IF VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR STRING EXPR FUNC_CALL VAR VAR STRING VAR NUMBER IF VAR VAR VAR STRING ASSIGN VAR VAR VAR NUMBER ASSIGN VAR VAR ASSIGN VA... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | a = input()
b = []
l = 0
for i in range(len(a)):
if a[i] != "a" and a[i] != "e" and a[i] != "i" and a[i] != "o" and a[i] != "u":
if l < 2:
l += 1
elif a[i] != a[i - 1] or a[i] != a[i - 2]:
l = 1
b.append(" ")
else:
l = 0
b.append(a[i])
print("".joi... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING IF VAR NUMBER VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER EXPR FUNC_CALL VAR STRING ASSIGN VAR ... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | def gl(x):
return x not in ["e", "u", "i", "o", "a"]
s = input()
o = 0
print(s[:2], end="")
for i in range(2, len(s)):
if (
gl(s[i - 2])
and gl(s[i - 1])
and gl(s[i])
and (s[i - 2] != s[i - 1] or s[i - 1] != s[i])
and o + 1 < i
):
print(" ", end="")
... | FUNC_DEF RETURN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER EXPR FUNC_CALL VAR VAR NUMBER STRING FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR IF FUNC_CALL VAR VAR BIN_OP VAR NUMBER FUNC_CALL VAR VAR BIN_OP VAR NUMBER FUNC_CALL VAR VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
k = 0
d = 0
vowels = "aeiou"
res = ""
lc = " "
for c in s:
if not c in vowels:
k += 1
if c == lc:
d += 1
if k - 1 != d and k >= 3:
c != lc
res += " "
k = 1
d = 0
else:
d = 0
k = 0
res += c
lc ... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR STRING FOR VAR VAR IF VAR VAR VAR NUMBER IF VAR VAR VAR NUMBER IF BIN_OP VAR NUMBER VAR VAR NUMBER EXPR VAR VAR VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER VAR VAR ASSIGN VA... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | n = input()
k = 0
f = ["a", "e", "i", "o", "u"]
s = ""
for i in range(len(n)):
if n[i] in f:
k = 0
elif k < 2:
k += 1
elif n[i - 2] == n[i - 1] == n[i]:
k += 1
else:
k = 1
s += " "
s += n[i]
print(s) | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR ASSIGN VAR NUMBER IF VAR NUMBER VAR NUMBER IF VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR NUMBER ASSIGN VAR NUMBER VAR STRING VAR VAR VAR EXP... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
a = []
volumes = ["a", "e", "i", "o", "u"]
i = 0
f = 0
while i + 2 < len(s):
if (
s[i] not in volumes
and s[i + 1] not in volumes
and s[i + 2] not in volumes
and (s[i] != s[i + 1] or s[i] != s[i + 2] or s[i + 1] != s[i + 2])
):
a.append(s[f : i + 2])
f... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE BIN_OP VAR NUMBER FUNC_CALL VAR VAR IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER V... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
a = "aeiou"
ans = []
cnt = 0
last = 0
for i in range(0, len(s)):
if s[i] not in a:
cnt += 1
else:
cnt = 0
if (
i != len(s) - 1
and cnt >= 2
and s[i + 1] not in a
and (s[i] != s[i + 1] or s[i] != s[i - 1])
):
ans.append(s[last : i + 1])
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR LIST ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR IF VAR VAR VAR VAR NUMBER ASSIGN VAR NUMBER IF VAR BIN_OP FUNC_CALL VAR VAR NUMBER VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBE... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | x = input()
v = "aiueo"
y = ""
i = 0
while True:
try:
if (
x[i + 2] not in v
and x[i + 1] not in v
and not x[i] == x[i + 1] == x[i + 2]
and x[i] not in v
):
y += x[i : i + 2] + " "
i += 2
else:
y += x[i]
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE NUMBER IF VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR VAR BIN_OP VAR VAR BIN_OP VAR NUMBER STRING VAR NUMBER VAR VAR VAR VAR NUMBER VAR VAR VAR VAR EXPR FUNC_CALL ... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | inp = input()
out = ""
c = 0
d = 0
for i in range(len(inp)):
if (
inp[i] == "a"
or inp[i] == "e"
or inp[i] == "i"
or inp[i] == "o"
or inp[i] == "u"
):
c = 0
d = 0
elif c >= 2:
if d or inp[i] != inp[i - 1]:
out += " "
c =... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR STRING ASSIGN VAR NUMBER ASSIGN ... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
s1 = ""
cnt = 0
pos = 0
st = set()
for i in range(len(s)):
if s[i] not in ["a", "o", "u", "i", "e"]:
cnt += 1
st.add(s[i])
if cnt >= 3 and len(st) > 1:
s1 += s[pos:i] + " "
pos = i
cnt = 1
st = set(s[i])
else:
cnt = 0
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR LIST STRING STRING STRING STRING STRING VAR NUMBER EXPR FUNC_CALL VAR VAR VAR IF VAR NUMBER FUNC_CALL VAR VAR NUMBER VAR BIN_OP VAR VAR VAR STRING ASSIGN VAR VAR ASS... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | a = input()
n = len(a)
b = ""
i = 0
def f(s):
n = len(s)
if len(set(s)) > 1:
s1 = ""
s1 += s[0]
k = 1
m = 1
for i in range(1, n):
if k == 1 and s1[-1] == s[i]:
s1 += s[i]
m += 1
elif k == 1 and m == 1:
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR STRING ASSIGN VAR NUMBER FUNC_DEF ASSIGN VAR FUNC_CALL VAR VAR IF FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER ASSIGN VAR STRING VAR VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR IF VAR NUMBER VAR NUMBER VAR VAR VAR VAR VAR VAR... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | def check(ch):
return ch not in "aeiou"
s = input()
pos = []
i = 0
while i < len(s) - 2:
a, b, c = s[i], s[i + 1], s[i + 2]
if check(a) and check(b) and check(c) and not a == b == c:
pos.append(i + 2)
i += 1
i += 1
ans = ""
for i in range(len(s)):
if i in pos:
ans += " "
... | FUNC_DEF RETURN VAR STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR VAR VAR VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER IF FUNC_CALL VAR VAR FUNC_CALL VAR VAR FUNC_CALL VAR VAR VAR VAR VAR EXPR FUNC_CALL VAR BIN_OP VAR NUMBER VAR NUMBER VAR ... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | import sys
input = sys.stdin.readline
s = input().strip()
n = len(s)
c = {"a", "e", "i", "o", "u"}
ind = []
i = 0
while i <= n - 3:
if s[i] not in c and s[i + 1] not in c and s[i + 2] not in c:
if s[i] == s[i + 1] == s[i + 2]:
i += 1
continue
else:
ind.append(i +... | IMPORT ASSIGN VAR VAR ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR LIST ASSIGN VAR NUMBER WHILE VAR BIN_OP VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR IF VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR ... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | def f(s):
cons = [True] * 26
for c in ("a", "e", "i", "o", "u"):
cons[ord(c) - ord("a")] = False
out = []
n = len(s)
count = 0
wsize = 0
for i in range(n):
c = s[i]
if wsize == 3:
prev = s[i - wsize]
if cons[ord(prev) - ord("a")]:
... | FUNC_DEF ASSIGN VAR BIN_OP LIST NUMBER NUMBER FOR VAR STRING STRING STRING STRING STRING ASSIGN VAR BIN_OP FUNC_CALL VAR VAR FUNC_CALL VAR STRING NUMBER ASSIGN VAR LIST ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR ASSIGN VAR VAR VAR IF VAR NUMBER ASSIGN VAR VAR BIN_OP VAR V... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | v = {"a", "e", "i", "o", "u"}
line = list(input())
l = []
s = []
n = len(line)
for i in range(n):
if line[i] not in v:
s.append(line[i])
if len(s) >= 3 and len(set(s)) >= 2:
l.append(" ")
l.append(line[i])
s = [line[i]]
else:
l.append(line[i])
... | ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR LIST ASSIGN VAR FUNC_CALL VAR VAR FOR VAR FUNC_CALL VAR VAR IF VAR VAR VAR EXPR FUNC_CALL VAR VAR VAR IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR STRING EXPR FUNC_CAL... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
t = ""
n = len(s)
ans = []
arr = ["a", "e", "i", "o", "u"]
if n < 3:
print(s)
else:
i = 0
while i < n - 2:
p = [s[i], s[i + 1], s[i + 2]]
if len(set(p)) == 1:
ans.append(s[i])
i += 1
elif s[i] not in arr and s[i + 1] not in arr and s[i + 2] not in ... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR LIST ASSIGN VAR LIST STRING STRING STRING STRING STRING IF VAR NUMBER EXPR FUNC_CALL VAR VAR ASSIGN VAR NUMBER WHILE VAR BIN_OP VAR NUMBER ASSIGN VAR LIST VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER IF FUNC_CALL VAR FUNC_CALL VAR... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | t = 1
alfsog = "bcdfghjklmnpqrstvwxyz"
for qwe in range(t):
s = input()
alfsog = set(alfsog)
alf = alfsog
listt = []
flag = False
for i in range(len(s) - 2):
if flag:
flag = False
continue
if s[i] == s[i + 1] and s[i + 1] == s[i + 2]:
continue
... | ASSIGN VAR NUMBER ASSIGN VAR STRING FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR VAR ASSIGN VAR LIST ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR ASSIGN VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
vowels = "aeiou"
ns = ""
blurb = ""
for c in s:
if c in vowels:
blurb = ""
else:
blurb += c
if len(blurb) == 3:
if blurb.count(c) != 3:
blurb = c
ns += " "
else:
blurb = c + c
ns += c
print(ns) | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR STRING FOR VAR VAR IF VAR VAR ASSIGN VAR STRING VAR VAR IF FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR NUMBER ASSIGN VAR VAR VAR STRING ASSIGN VAR BIN_OP VAR VAR VAR VAR EXPR FUNC_CALL VAR VAR |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
j = ""
k = "aeiou"
i = 0
a = set()
n = len(s)
while i < n - 2:
if s[i] not in k:
a.add(s[i])
if s[i + 1] not in k:
a.add(s[i + 1])
if s[i + 2] not in k:
a.add(s[i + 2])
if len(a) == 1:
j += s[i]
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR WHILE VAR BIN_OP VAR NUMBER IF VAR VAR VAR EXPR FUNC_CALL VAR VAR VAR IF VAR BIN_OP VAR NUMBER VAR EXPR FUNC_CALL VAR VAR BIN_OP VAR NUMBER IF VAR BIN_OP VAR NUMBER VAR EXPR FUNC_CALL VAR... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
ans = []
start = 0
c = 0
const = set()
for i in range(len(s)):
if s[i] in "aeiou":
const = set()
c = 0
else:
c += 1
const.add(s[i])
if c >= 3 and len(const) >= 2:
ans.append(s[start:i])
start = i
const = set({s[i]})
... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR VAR VAR IF VAR NUMBER FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR VAR VAR VAR ASSIGN VA... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
op = []
dl = len(s)
i = 2
gl = {"a", "e", "i", "o", "u"}
l = -1
while i < dl:
if (
s[i - 2] not in gl
and s[i - 1] not in gl
and s[i] not in gl
and s[i - 2 : i + 1] != s[i - 2] * 3
):
if l == -1:
l = i - 2
elif l != -1:
op.append(str(l)... | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR NUMBER WHILE VAR VAR IF VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR VAR VAR VAR BIN_OP VAR NUMBER BIN_OP VAR NUMBER BIN_OP VAR BIN_OP VAR NUMBER NUMBER IF VAR NUMB... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | def f(s):
n = len(s)
vow = ["a", "e", "i", "o", "u"]
i = 0
while i < n - 2:
if s[i] not in vow and s[i + 1] not in vow and s[i + 2] not in vow:
if not (s[i] == s[i + 1] and s[i] == s[i + 2]):
print(s[i : i + 2], end=" ")
i = i + 2
else:
... | FUNC_DEF ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR IF VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR VAR VAR BIN_OP VAR NUMBER STRING ASS... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | st = input()
k = 0
i = 0
while i < len(st):
if not st[i] in ["a", "e", "i", "o", "u"]:
if k < 3:
k += 1
else:
k = 0
if k == 3:
if not st[i] == st[i - 1] == st[i - 2]:
st = st[:i] + " " + st[i:]
k = 1
i += 1
i += 1
print(st) | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF VAR VAR LIST STRING STRING STRING STRING STRING IF VAR NUMBER VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR STRING VAR VAR ASSIGN VAR NUMBER VA... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | def Dif(string):
if string.count(string[0]) != len(string):
return True
else:
return False
def Conv(st):
if len(st) < 3 or not Dif(st):
return st
s1 = ""
s = ""
for i in range(len(st)):
s1 += st[i]
if len(s1) > 2 and Dif(s1):
s += " "
... | FUNC_DEF IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR RETURN NUMBER RETURN NUMBER FUNC_DEF IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR RETURN VAR ASSIGN VAR STRING ASSIGN VAR STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR VAR VAR IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR VAR STRING ASSIGN VAR VAR VAR VAR VAR... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | u = list(input())
n = len(u)
a = set(["a", "o", "u", "e", "i"])
p = 0
i = 2
while i < n:
if u[i - 2] not in a and u[i - 1] not in a and u[i] not in a:
if u[i - 2] != u[i - 1] or u[i - 1] != u[i] or u[i] != u[i - 2]:
print("".join(map(str, u[p:i])), end=" ")
p = i
i += 2
... | ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR VAR IF VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR VAR VAR IF VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER V... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
t = "aeiou"
i = 0
while i < len(s) - 2:
if (
s[i] not in t
and s[i + 1] not in t
and s[i + 2] not in t
and len(set(s[i : i + 3])) > 1
):
s = s[: i + 2] + " " + s[i + 2 :]
i += 3
else:
i += 1
print(s) | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR BIN_OP BIN_OP VAR BIN_OP VAR NUMBER STRING VAR BIN_OP VAR NUMBER VAR NUMBER VA... |
Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them.
Beroffice works only with small English letters (i.e. with 26 letters from a to z). Beroffice thinks that a word is typed with a typo if there are thr... | s = input()
num = 0
res = ""
A = ["a", "e", "i", "o", "u"]
for i in s:
num += 1
if len(res) > 1 and i == res[len(res) - 1] == res[len(res) - 2]:
num = 2
if i in A:
num = 0
if num >= 3:
res += " "
num = 1
res += i
print(res) | ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR LIST STRING STRING STRING STRING STRING FOR VAR VAR VAR NUMBER IF FUNC_CALL VAR VAR NUMBER VAR VAR BIN_OP FUNC_CALL VAR VAR NUMBER VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR NUMBER IF VAR VAR ASSIGN VAR NUMBER IF VAR NUMBER VAR STRING ASSIGN VA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.