description
stringlengths
171
4k
code
stringlengths
94
3.98k
normalized_code
stringlengths
57
4.99k
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", "i", "e", "o", "u"] t = [] i = 0 while i + 2 < len(s): good = 0 if s[i] in gl or s[i + 1] in gl or s[i + 2] in gl or s[i] == s[i + 1] == s[i + 2]: good = 1 t.append(s[i]) if not good: t.append(s[i + 1]) t.append(" ") i += 1 i += 1 while i < len(...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR LIST ASSIGN VAR NUMBER WHILE BIN_OP VAR NUMBER FUNC_CALL VAR VAR ASSIGN VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER 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...
def glas(gl, s): if s[0] in gl or s[1] in gl or s[2] in gl: return 1 else: return 0 def right(gl, s): if s[0] == s[1] and s[0] == s[2] or glas(gl, s): return 1 else: return 0 s = input() i = len(s) gl = "aeoiu" k = 0 while k <= i - 3: s1 = s[k : k + 3] if not ...
FUNC_DEF IF VAR NUMBER VAR VAR NUMBER VAR VAR NUMBER VAR RETURN NUMBER RETURN NUMBER FUNC_DEF IF VAR NUMBER VAR NUMBER VAR NUMBER VAR NUMBER FUNC_CALL VAR VAR VAR RETURN NUMBER RETURN NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP VAR NUMBER 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...
s = input() s1 = "" i = 0 while i < len(s) - 2: if ( (s[i] != s[i + 1] or s[i + 2] != s[i + 1] or s[i] != s[i + 2]) and s[i] != "i" and s[i] != "a" and s[i] != "e" and s[i] != "o" and s[i] != "u" and s[i + 1] != "i" and s[i + 1] != "a" and s[i ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR STRING VAR VAR 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...
def puzzle(): st = input() a = "" b = "" c = "" res = "" vowels = "aiueo " for i in range(len(st)): res += c c = b b = a a = st[i] if a not in vowels and b not in vowels and c not in vowels: if not a == b == c: res += c ...
FUNC_DEF ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR ASSIGN VAR VAR VAR IF VAR VAR VAR VAR VAR VAR IF VAR VAR VAR VAR VAR ASSIGN VAR VAR ASSIGN VAR STRING VAR BIN_OP BIN_O...
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) if n == 1 or n == 2: print(s) else: a = ["a", "e", "i", "o", "u"] q, w = "", "" if s[0] not in a: q = s[0] if s[1] not in a: w = s[1] res = s[:2] for i in range(2, n): e = s[i] if e not in a: if q != "" and w != "": ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR VAR STRING STRING IF VAR NUMBER VAR ASSIGN VAR VAR NUMBER IF VAR NUMBER VAR ASSIGN VAR VAR NUMBER ASSIGN VAR VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER 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...
ans = ["a", "e", "i", "o", "u"] s = input() point = 0 for i in range(2, len(s)): r = s[i] == s[i - 1] == s[i - 2] if ( s[i] not in ans and s[i - 1] not in ans and s[i - 2] not in ans and r == False and i - 2 >= point ): print(s[point:i], end=" ") point...
ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR ASSIGN VAR VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR NUMBER BIN_OP VAR NUMBER VAR EXPR FUNC_CALL 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...
class Solver: def main(self): s = input() ls = len(s) vowels = "aeiou" cnt = 0 breaks = [] same = 0 for i in range(0, ls): if s[i] in vowels: cnt = 0 same = 0 elif i > 0 and s[i - 1] == s[i]: ...
CLASS_DEF FUNC_DEF ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR LIST ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR IF VAR VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR NUMBER ASSIGN VAR VAR VAR NUMBER IF BIN_OP 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().strip() gl = {"a", "i", "o", "u", "e"} answer = "" word = [] i = 1 while i < len(s) - 1: if (s[i] not in gl and s[i - 1] not in gl and s[i + 1] not in gl) and len( {s[i], s[i - 1], s[i + 1]} ) > 1: s = s[: i + 1] + " " + s[i + 1 :] i += 3 else: i += 1 print(s)
ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR STRING ASSIGN VAR LIST 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 VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER NUMBER ASSIG...
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"] word = [str(i) for i in input()] consonant_counter = 0 increment = -1 vowelchain = [] for letter in word: increment += 1 if letter not in vowels: vowelchain.append(letter) consonant_counter += 1 if consonant_counter == 3 and vowelchain.count(letter) != ...
ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR LIST FOR VAR VAR VAR NUMBER IF VAR VAR EXPR FUNC_CALL VAR VAR VAR NUMBER IF VAR NUMBER FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR VAR STRING ASSIGN VAR NUMBER ASSIGN VAR LIST...
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 vowels = set(["a", "e", "i", "o", "u"]) word = sys.stdin.readline().rstrip("\n") correct = [] curr = [] cons = [] for i in range(len(word)): if word[i] in vowels: curr.append(word[i]) cons = [] else: cons.append(word[i]) if len(set(cons)) != 1 and len(cons) > 2: ...
IMPORT ASSIGN VAR FUNC_CALL VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL FUNC_CALL VAR STRING ASSIGN VAR LIST ASSIGN VAR LIST ASSIGN VAR LIST FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR EXPR FUNC_CALL VAR VAR VAR ASSIGN VAR LIST EXPR FUNC_CALL VAR VAR VAR IF FUNC_CALL VAR FUNC_CALL VAR 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...
input_str = input("") input_str_len = len(input_str) if input_str_len > 3000 or input_str_len < 1: print("-") else: vowels = {"a", "e", "i", "o", "u", " "} last_char = "" final_str = "" consecutive_consonants = 0 consecutive_same_consonants_in_a_row = 0 for v in input_str: final_str ...
ASSIGN VAR FUNC_CALL VAR STRING ASSIGN VAR FUNC_CALL VAR VAR IF VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STRING ASSIGN VAR STRING STRING STRING STRING STRING STRING ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR VAR VAR VAR IF VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF 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...
good = ["a", "e", "i", "o", "u"] s = input().strip() ans = [] nw = "" i = 0 while i < len(s) - 2: nw += s[i] if not s[i] == s[i + 1] == s[i + 2]: if not (s[i] in good or s[i + 1] in good or s[i + 2] in good): nw += s[i + 1] ans.append(nw) i += 1 nw = "" ...
ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER VAR VAR VAR IF VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR 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() vow = ["a", "e", "i", "o", "u"] c = 0 n = len(s) arr = [] for i in range(0, n): if s[i] in vow: c = 0 continue if s[i] not in vow: c += 1 if c == 3: if s[i] == s[i - 1] and s[i - 1] == s[i - 2]: c = 2 continue arr.append(i) ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR LIST FOR VAR FUNC_CALL VAR NUMBER VAR IF VAR VAR VAR ASSIGN VAR NUMBER IF VAR VAR VAR VAR NUMBER IF VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER 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...
word = list(input()) ns = 0 onesymbol = "" onesymbolcount = 0 for i in range(len(word)): if onesymbol == word[i] and ns == 0: onesymbolcount += 1 continue if word[i] in ["a", "e", "i", "o", "u"]: ns = 0 onesymbolcount = 0 onesymbol = "" else: if onesymbol != "...
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR VAR NUMBER VAR NUMBER IF VAR VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR STRING IF VAR STRING VAR VAR ASSIGN VAR VAR VAR ASSI...
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...
k = 0 t = y = z = "" for x in input(): k = 0 if x in "aeiou" else k + 1 if k > 2 and not x == y == z: t += " " k = 1 y, z = x, y t += x print(t)
ASSIGN VAR NUMBER ASSIGN VAR VAR VAR STRING FOR VAR FUNC_CALL VAR ASSIGN VAR VAR STRING NUMBER BIN_OP VAR NUMBER IF VAR NUMBER VAR VAR VAR VAR STRING ASSIGN VAR NUMBER ASSIGN VAR VAR 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() s2 = "" gl = "aeiou" i = 0 while i < len(s): s2 += s[i] if i + 2 < len(s): if not (s[i] in gl or s[i + 1] in gl or s[i + 2] in gl): if not (s[i] == s[i + 1] and s[i + 1] == s[i + 2]): s2 += s[i + 1] + " " i += 1 i += 1 print(s2)
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR VAR VAR VAR IF BIN_OP VAR NUMBER FUNC_CALL VAR VAR 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 BIN_OP VAR NUMBER VAR BIN_OP 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...
import sys MOD, mod = 1000000007, 998244353 def get_array(): return list(map(int, sys.stdin.readline().strip().split())) def get_ints(): return map(int, sys.stdin.readline().strip().split()) def input(): return sys.stdin.readline().strip() string = input() n = len(string) i = 0 ans = "" vowel = ["a...
IMPORT ASSIGN VAR VAR NUMBER NUMBER FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR NUMBER ASSIGN VAR STRING ASSI...
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 = s g = "aeiou " i = 0 while i < len(ans) - 2: if ans[i] == ans[i + 1] and ans[i] == ans[i + 2]: i += 1 continue if ans[i] not in g and ans[i + 1] not in g and ans[i + 2] not in g: ans = ans[: i + 2] + " " + ans[i + 2 :] i += 1 print(ans)
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR VAR ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR ASSIGN VAR BIN_OP BIN_OP 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...
n = input() n += " " def alph(a): flag = bool(True) for i in ["a", "e", "i", "o", "u", " "]: if i == a: flag = False if flag == False: return 0 else: return 1 i = 0 while i != len(n) - 2: if alph(n[i]) == 1 and alph(n[i + 1]) == 1 and alph(n[i + 2]) == 1: ...
ASSIGN VAR FUNC_CALL VAR VAR STRING FUNC_DEF ASSIGN VAR FUNC_CALL VAR NUMBER FOR VAR LIST STRING STRING STRING STRING STRING STRING IF VAR VAR ASSIGN VAR NUMBER IF VAR NUMBER RETURN NUMBER RETURN NUMBER ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR VAR NUMBER FUNC_CALL VAR VAR BIN_OP ...
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) alf = ["a", "e", "i", "u", "o"] i = 0 ch = 0 while i < n: if not s[i] in alf: ch += 1 else: ch = 0 if ch == 3: if not s[i - 2] == s[i - 1] == s[i]: print(" ", end="") ch = 1 else: ch = 2 print(s[i], end="") i ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR VAR IF VAR VAR VAR VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER IF VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR EXPR FUNC_CALL VAR STRING STRING ASSIGN VAR NUMBER A...
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 r in range(2, len(s)): if ( r - l >= 2 and not any(c in "aeiou" for c in s[r - 2 : r + 1]) and s[r - 2 : r + 1].count(s[r]) < 3 ): res.append(s[l:r]) l = r res.append(s[l:]) print(" ".join(res))
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR IF BIN_OP VAR VAR NUMBER FUNC_CALL VAR VAR STRING VAR VAR BIN_OP VAR NUMBER BIN_OP VAR NUMBER FUNC_CALL VAR BIN_OP VAR NUMBER BIN_OP VAR NUMBER VAR VAR NUMBER EXPR FUNC_CALL VAR VAR VAR VAR ASSIGN VAR VAR EXPR 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...
def f(x): return x not in "aeiou" s, res = input(), "" i = 0 while i < len(s) - 2: if ( f(s[i]) and f(s[i + 1]) and f(s[i + 2]) and (s[i] != s[i + 1] or s[i + 1] != s[i + 2]) ): res += s[i] + s[i + 1] + " " i += 2 else: res += s[i] i += 1...
FUNC_DEF RETURN VAR STRING ASSIGN VAR VAR FUNC_CALL VAR STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR VAR FUNC_CALL VAR VAR BIN_OP VAR NUMBER FUNC_CALL VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP BIN_OP 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() k = 0 lis = ["a", "e", "i", "o", "u", " "] x = "" z = "" v = "" for j in s: if j not in lis: if z == j == v: k = 2 else: k += 1 v = z z = j if k == 3: x += " " k = 1 x += j else: v = z z =...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR LIST STRING STRING STRING STRING STRING STRING ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR STRING FOR VAR VAR IF VAR VAR IF VAR VAR VAR ASSIGN VAR NUMBER VAR NUMBER ASSIGN VAR VAR ASSIGN VAR VAR IF VAR NUMBER VAR STRING ASSIGN VAR NUMBER VAR VAR ASSIGN VAR VAR AS...
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() words = "" g = "aeiou" i = 0 while len(s) > 2: if s[i] not in g and s[i + 1] not in g and s[i + 2] not in g: if s[i] == s[i + 1] == s[i + 2]: i += 1 if i == len(s) - 2: break continue words += s[: i + 2] + " " s = s[i + 2 :] ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE FUNC_CALL VAR 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 NUMBER IF VAR BIN_OP FUNC_CALL VAR VAR NUMBER VAR BIN_OP VAR BIN_OP VAR NUMBER STRIN...
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() c = "aeiou" ans = "@" cn = 0 sm = 1 for i in s: if i in c: cn = 0 sm = 1 elif i == ans[-1]: sm += 1 cn += 1 elif i != ans[-1]: cn += 1 if cn == sm or cn < 3: ans += i elif cn > 2: ans += " " ans += i cn = 1 s...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR VAR IF VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF VAR VAR NUMBER VAR NUMBER VAR NUMBER IF VAR VAR NUMBER VAR NUMBER IF VAR VAR VAR NUMBER VAR VAR IF VAR NUMBER VAR STRING VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUM...
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(st=str()): tf = 0 for i in range(2): if st[i] != st[i + 1]: tf = 1 if tf == 1: return True else: return False st = input() anst = "" vowels = "a", "e", "i", "o", "u" count = 0 i = 0 while i < len(st): if st[i] not in vowels: count += 1 else...
FUNC_DEF FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER RETURN NUMBER RETURN NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF 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() n = len(s) sogl = ["a", "e", "i", "o", "u"] i = 0 ans = [] while i < n - 2: if ( not s[i] in sogl and not s[i + 1] in sogl and not s[i + 2] in sogl and not s[i] == s[i + 1] == s[i + 2] ): ans.append(i + 2) i += 1 i += 1 j = 0 for i in ans: prin...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR LIST WHILE VAR BIN_OP VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR BIN_OP 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...
s = input() k = 0 s1 = "" s2 = ["", "", ""] for a in s: if a == "a" or a == "e" or a == "i" or a == "o" or a == "u": s1 += a k = 0 elif k + 1 == 3: s2[2] = a if s2[0] != s2[1] or s2[0] != s2[2]: s1 = s1 + " " + a k = 1 s2[0] = a else: ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR LIST STRING STRING STRING FOR VAR VAR IF VAR STRING VAR STRING VAR STRING VAR STRING VAR STRING VAR VAR ASSIGN VAR NUMBER IF BIN_OP VAR NUMBER NUMBER ASSIGN VAR NUMBER VAR IF VAR NUMBER VAR NUMBER VAR NUMBER VAR NUMBER ASSIGN VAR BIN_OP 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...
vowels = ["a", "e", "i", "o", "u"] s = input() i = 0 l = list(s) while i < len(l) - 2: if l[i] not in vowels and l[i + 1] not in vowels and l[i + 2] not in vowels: if l[i] * 3 != l[i] + l[i + 1] + l[i + 2]: l.insert(i + 2, " ") i += 2 i += 1 print("".join(l))
ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR 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 IF BIN_OP VAR VAR NUMBER BIN_OP BIN_OP VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP 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 main(): s = input() a = [] g = [elem for elem in "aeiou"] p = [] for i in range(len(s)): if s[i] not in g: a.append(s[i]) else: a = [] if len(a) == 3: if a[0] != a[1] or a[1] != a[2]: a = [a[2]] p.append(...
FUNC_DEF ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR VAR VAR STRING ASSIGN VAR LIST FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR EXPR FUNC_CALL VAR VAR VAR ASSIGN VAR LIST IF FUNC_CALL VAR VAR NUMBER IF VAR NUMBER VAR NUMBER VAR NUMBER VAR NUMBER ASSIGN VAR LIST VAR NUMBER EXPR FUNC_CALL VAR VAR ASSIG...
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...
word = input() l = ["a", "e", "i", "o", "u"] curr_s = [] i = 0 for j in range(len(word)): if word[j] not in l: if curr_s.count(word[j]) > 1: continue curr_s.append(word[j]) if len(curr_s) > 2: print(word[i:j], end=" ") curr_s = [word[j]] i = j ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR LIST ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR IF FUNC_CALL VAR VAR VAR NUMBER EXPR FUNC_CALL VAR VAR VAR IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR VAR VAR VAR STRING ASSIGN VAR LIST VAR 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...
i = input() alphabet = [ "B", "C", "D", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "X", "Y", "Z", ] res = "" flag = 0 for j in range(len(i)): if flag > 0: flag -= 1 res += i[j] ...
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 NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR NUMBER VAR NUMBER VAR VAR VAR IF VAR NUMBER VAR B...
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...
result, seq, same, prev = [], 0, True, "" for i in input(): seq = 0 if i in "aeiou" else seq + 1 same = seq == 1 or same and i == prev prev = i if seq >= 3 and not same: result.append(" ") seq, same = 1, True result.append(i) print("".join(result))
ASSIGN VAR VAR VAR VAR LIST NUMBER NUMBER STRING FOR VAR FUNC_CALL VAR ASSIGN VAR VAR STRING NUMBER BIN_OP VAR NUMBER ASSIGN VAR VAR NUMBER VAR VAR VAR ASSIGN VAR VAR IF VAR NUMBER VAR EXPR FUNC_CALL VAR STRING ASSIGN VAR VAR NUMBER NUMBER EXPR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR FUNC_CALL STRING 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 = "" vowels = {"a", "e", "i", "o", "u"} i = 0 while i < len(s) - 2: if s[i] in vowels: ans += s[i] i += 1 elif s[i] == s[i + 1] == s[i + 2]: ans += s[i] i += 1 elif s[i + 1] not in vowels and s[i + 2] not in vowels: ans += s[i] + s[i + 1] + " " ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR VAR VAR VAR VAR VAR VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR VAR NUMBER IF VAR BIN_OP VAR NUMBER VAR 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...
s = "qwrtpsdfghjklzxcvbnmy" t = input() i = 1 while i < len(t) - 1: k = 0 if s.find(t[i - 1]) != -1: k += 1 if s.find(t[i]) != -1: k += 1 if s.find(t[i + 1]) != -1: k += 1 if t[i - 1] == t[i] == t[i + 1]: k = 0 if k == 3: t = t[0 : i + 1] + " " + t[i + 1 :...
ASSIGN VAR STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR NUMBER IF FUNC_CALL VAR VAR BIN_OP VAR NUMBER NUMBER VAR NUMBER IF FUNC_CALL VAR VAR VAR NUMBER VAR NUMBER IF FUNC_CALL VAR VAR BIN_OP VAR NUMBER NUMBER VAR NUMBER IF VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_O...
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 = ["a", "e", "i", "o", "u"] sp = [] for i in range(len(s)): sp.append(s[i]) k = 0 for i in range(len(s)): if s[i] not in l: k += 1 if i > 1 and s[i] == s[i - 1] == s[i - 2]: k = 2 else: k = 0 if k == 3: sp[i - 1] = sp[i - 1] + " " k = 1 f...
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 EXPR FUNC_CALL VAR VAR VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR VAR NUMBER IF VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER 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...
import sys s = input() p = [0] * 30000 i = 0 while i < len(s) - 2: if ( s[i] not in "aeiou" and s[i + 1] not in "aeiou" and s[i + 2] not in "aeiou" and (s[i] != s[i + 1] or s[i] != s[i + 2]) ): p[i + 1] = 1 i += 2 else: i += 1 ans = "" for i in range(...
IMPORT ASSIGN VAR FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER NUMBER ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER IF VAR VAR STRING VAR BIN_OP VAR NUMBER STRING VAR BIN_OP VAR NUMBER STRING VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER NUMBER VAR NUMBER 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() c = [] ind = [] for i in range(len(a)): if a[i] not in "aeiou": if len(c) > 1 and not (a[i] == c[-1] and a[i] == c[-2]): ind.append(i) c = [] c.append(a[i]) else: c = [] ind.append(len(a)) print(a[: ind[0]], end=" ") for i in range(1, len(ind)): pr...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR LIST FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR STRING IF FUNC_CALL VAR VAR NUMBER VAR VAR VAR NUMBER VAR VAR VAR NUMBER EXPR FUNC_CALL VAR VAR ASSIGN VAR LIST EXPR FUNC_CALL VAR VAR VAR ASSIGN VAR LIST EXPR FUNC_CALL VAR FUNC_CALL VAR VAR EXPR FUNC_CALL 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() c = [] ans = "" for i in s: if i in "eioua": c = [] else: c.append(i) if len(c) > 2 and len(set(c)) > 1: ans += " " c = [i] ans += i print(ans)
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST ASSIGN VAR STRING FOR VAR VAR IF VAR STRING ASSIGN VAR LIST EXPR FUNC_CALL VAR VAR IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER VAR STRING ASSIGN VAR LIST 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...
a = [ "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z", ] b = input() n = 0 g = 0 s = [] check = False print(b[0], end="") for i in range(1, len(b) - 1): if check: print...
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 FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR LIST ASSIGN VAR NUMBER EXPR FUNC_CALL VAR VAR NUMBER STRING FOR VAR FUNC_CALL VAR NUM...
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 sogl(a): glas = ["u", "a", "i", "e", "o"] for letter in glas: if letter == a: return False return True def xor(a, b, c): j = 0 if a == b: j += 1 if a == c: j += 1 if j == 2: return False else: return True line = input() let = 0 ...
FUNC_DEF ASSIGN VAR LIST STRING STRING STRING STRING STRING FOR VAR VAR IF VAR VAR RETURN NUMBER RETURN NUMBER FUNC_DEF ASSIGN VAR NUMBER IF VAR VAR VAR NUMBER IF VAR VAR VAR NUMBER IF VAR NUMBER RETURN NUMBER RETURN NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR IF FUN...
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) gl = "aeiou" i = 2 pr = lambda i: print(s[i], end="") pr(0) if 1 < n: pr(1) while i < n: flag = 1 for j in range(i - 2, i + 1): if s[j] in gl: flag = 0 if len(set(s[i - 2 : i + 1])) > 1 and flag: print(end=" ") pr(i) i += 1 if i < n:...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR VAR STRING EXPR FUNC_CALL VAR NUMBER IF NUMBER VAR EXPR FUNC_CALL VAR NUMBER WHILE VAR VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER BIN_OP VAR NUMBER IF VAR VAR VAR ASSIGN VAR NUMBER I...
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, i = input(), 0 ans = 0 while i < len(s): cur = [] while i < len(s) and s[i] in ["a", "e", "i", "o", "u"]: print(s[i], end="") i += 1 while i < len(s) and not s[i] in ["a", "e", "i", "o", "u"]: cur += s[i] i += 1 if len(cur) == 0: break j, sz = 1, 1 prin...
ASSIGN VAR VAR FUNC_CALL VAR NUMBER ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR ASSIGN VAR LIST WHILE VAR FUNC_CALL VAR VAR VAR VAR LIST STRING STRING STRING STRING STRING EXPR FUNC_CALL VAR VAR VAR STRING VAR NUMBER WHILE VAR FUNC_CALL VAR VAR VAR VAR LIST STRING STRING STRING STRING STRING VAR VAR 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...
checking = input() vowels = ["a", "e", "i", "o", "u"] streak = [] new = "" for i, letter in enumerate(checking): if letter not in vowels: streak.append(letter) else: streak = [] if len(streak) == 3: if streak.count(letter) == 3: streak = [letter, letter] else: ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR LIST ASSIGN VAR STRING FOR VAR VAR FUNC_CALL VAR VAR IF VAR VAR EXPR FUNC_CALL VAR VAR ASSIGN VAR LIST IF FUNC_CALL VAR VAR NUMBER IF FUNC_CALL VAR VAR NUMBER ASSIGN VAR LIST VAR VAR ASSIGN VAR LIST VAR VAR STRING VAR VAR EXPR FUNC_C...
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() a += "a" g = {"a", "e", "i", "o", "u"} b = "" def seach(b): b += "a" count = 0 i = -1 if len(set(b)) != 1: while True: i += 1 count += 1 if b[i] != b[i - 1]: if count > 2: i1 = i - count i2 ...
ASSIGN VAR FUNC_CALL VAR VAR STRING ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR STRING FUNC_DEF VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER WHILE NUMBER VAR NUMBER VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER IF VAR NUMBER ASSIGN VAR BIN_OP 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() c = s + "" a = [] b = [ "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z", ] for i in range(2, len(s)): if ( not c[i - 2] == c[i - 1] == c[i] and c[i ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR BIN_OP VAR STRING ASSIGN VAR LIST 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 FUNC_CALL VAR VAR IF 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() i = 0 ans = [] v = "aeiou" dif = set() n = 0 while i < len(s): if s[i] not in v: dif.add(s[i]) n += 1 elif s[i] in v: dif = set() n = 0 if len(dif) > 1 and n > 2: ans.append(" ") dif = set([s[i]]) n = 1 ans.append(s[i]) i += 1 print...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR LIST ASSIGN VAR STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF VAR VAR VAR EXPR FUNC_CALL VAR VAR VAR VAR NUMBER IF VAR VAR VAR ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER IF FUNC_CALL VAR VAR NUMBER VAR NUMBER EXPR FUNC_CALL VAR STR...
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) <= 2 or len(set(s)) == 1: print(s) exit() d = {} for i in range(97, 123): x = chr(i) if x in ["a", "e", "i", "o", "u"]: d.update({x: False}) else: d.update({x: True}) l, i = [], 0 while True: if i >= len(s) - 2: break if d[s[i]] == True and d[s[i...
ASSIGN VAR FUNC_CALL VAR IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR VAR EXPR FUNC_CALL VAR ASSIGN VAR DICT FOR VAR FUNC_CALL VAR NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR VAR IF VAR LIST STRING STRING STRING STRING STRING EXPR FUNC_CALL VAR DICT VAR NUMBER EXPR FUNC_CALL VAR DICT...
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 = "aeiou" word = input() consonants = word[0] not in vowels duplicates = 0 result = "" term = word[0] for p, w in zip(word, word[1:]): if w not in vowels: consonants += 1 else: consonants = duplicates = 0 if consonants > 0: duplicates += p == w if consonants > 2 and duplic...
ASSIGN VAR STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR VAR NUMBER VAR ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR VAR NUMBER FOR VAR VAR FUNC_CALL VAR VAR VAR NUMBER IF VAR VAR VAR NUMBER ASSIGN VAR VAR NUMBER IF VAR NUMBER VAR VAR VAR IF VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP BIN_OP VAR STRING VAR ASSIGN 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...
s = list(input()) h = "aeuio " l = "" i = 0 while i < len(s) - 2: a = s[i] b = s[i + 1] c = s[i + 2] if h.find(a) != -1 or h.find(b) != -1 or h.find(c) != -1 or a == b and a == c: i += 1 else: s.insert(i + 2, " ") i += 1 for i in range(len(s)): l += s[i] print(l)
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER ASSIGN VAR VAR VAR ASSIGN VAR VAR BIN_OP VAR NUMBER ASSIGN VAR VAR BIN_OP VAR NUMBER IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER VAR VAR VAR 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...
s = input() j = 0 a = ["a", "e", "i", "o", "u"] for i in range(len(s)): if j > 1: if not s[i] in a: if ( not s[i - 1] in a and not s[i - 2] in a and not s[i] == s[i - 1] == s[i - 2] ): print(" ", end="") ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR LIST STRING STRING STRING STRING STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR NUMBER IF VAR VAR VAR 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 EXPR FUNC_CALL VAR STRING STRING ASSIGN 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() n = len(s) v = ["a", "e", "i", "o", "u"] l = [] i = 0 j = 0 while i < n - 1: if s[i] not in v and s[i + 1] not in v: c = 1 x = set(s[i]) while s[i] not in v and s[i + 1] not in v: if c >= 2: if s[i] == s[i + 1] and len(x) == 1: pass...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR LIST ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR BIN_OP VAR NUMBER IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR VAR VAR WHILE VAR VAR VAR 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...
t = y = "" k = s = 0 for x in input(): if x in "aeiou": t += x k = s = 0 elif k == 1: if x == y: t += x s = 1 elif s: t += " " + x k, s, y = 1, 0, x else: t += x k = 2 elif k == 2: t += " ...
ASSIGN VAR VAR STRING ASSIGN VAR VAR NUMBER FOR VAR FUNC_CALL VAR IF VAR STRING VAR VAR ASSIGN VAR VAR NUMBER IF VAR NUMBER IF VAR VAR VAR VAR ASSIGN VAR NUMBER IF VAR VAR BIN_OP STRING VAR ASSIGN VAR VAR VAR NUMBER NUMBER VAR VAR VAR ASSIGN VAR NUMBER IF VAR NUMBER VAR BIN_OP STRING VAR ASSIGN VAR VAR VAR NUMBER 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...
a = input() gl = set(["a", "e", "i", "o", "u"]) cn = [0] * (200 + 1) ans = [] for i in range(len(a)): if a[i] in gl: for i1 in range(ord("a"), ord("z") + 1): cn[i1] = 0 continue cn[ord(a[i])] += 1 st = set() cnt = 0 for j in range(ord("a"), ord("z") + 1): if chr(j...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR BIN_OP LIST NUMBER BIN_OP NUMBER NUMBER ASSIGN VAR LIST FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR FOR VAR FUNC_CALL VAR FUNC_CALL VAR STRING BIN_OP FUNC_CALL VAR STRING NUMBER ASSIGN VAR VAR NUMBER VAR 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...
vowels = {"a", "e", "i", "o", "u"} s = input() count_consonant = 0 exists_different = False start = 0 for i in range(0, len(s)): if s[i] not in vowels: exists_different = count_consonant >= 1 and ( exists_different or s[i] != s[i - 1] ) count_consonant += 1 if count_conso...
ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR IF VAR VAR VAR ASSIGN VAR VAR NUMBER VAR VAR VAR VAR BIN_OP VAR NUMBER VAR NUMBER IF VAR NUMBER VAR EXPR FUNC_CALL VAR VAR VAR 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...
data = ["a", "e", "i", "o", "u"] s = list(input()) now = 0 i = 0 while i < len(s): if s[i] not in data: now += 1 else: now = 0 if now >= 3: if s[i] == s[i - 1] == s[i - 2]: pass else: s.insert(i, " ") i += 1 now = 1 i += 1 p...
ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF VAR VAR VAR VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER EXPR FUNC_CALL VAR VAR STRING VAR NUMBER ASSIGN VAR N...
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() def ans(s): vowel = {"a", "e", "i", "o", "u"} cc = 0 begin = 0 for i in range(len(s)): if s[i] in vowel: cc = 0 else: cc += 1 if cc >= 3 and (s[i] != s[i - 1] or s[i] != s[i - 2] or s[i - 1] != s[i - 2]): print(s[begin:i], end=" "...
ASSIGN VAR FUNC_CALL VAR FUNC_DEF ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR ASSIGN VAR NUMBER VAR NUMBER IF VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP VAR 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...
ch = str(input()) i = 0 C = ["a", "e", "i", "u", "o"] if len(ch) <= 2: print(ch) else: while i <= len(ch) - 3: if ( not ch[i] in C and not ch[i + 1] in C and not ch[i + 2] in C and (ch[i] != ch[i + 1] or ch[i] != ch[i + 2] or ch[i + 1] != ch[i + 2]) ...
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR LIST STRING STRING STRING STRING STRING IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR VAR 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 VAR VAR VAR BIN_OP VAR NUMBER VAR VAR 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 = str(input()) sgl = "bcdfghjklmnpqrstvwxyz" ans = "" for i in range(len(a)): ans += a[i] if len(ans) > 2: if ( sgl.count(ans[-1]) and sgl.count(ans[-2]) and sgl.count(ans[-3]) and (ans[-1] != ans[-2] or ans[-1] != ans[-3]) ): ans = a...
ASSIGN VAR FUNC_CALL VAR FUNC_CALL 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 IF FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER FUNC_CALL VAR VAR NUMBER VAR NUMBER VAR NUMBER VAR NUMBER VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR NUMBER 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...
gl = ["a", "e", "i", "o", "u"] def mist(a, b, c): if a in gl or b in gl or c in gl: return False if a == b and b == c: return False return True s = input() n = len(s) if n == 1: print(s[0]) else: print(s[0] + s[1], end="") last1 = s[0] last2 = s[1] for i in range(2, n...
ASSIGN VAR LIST STRING STRING STRING STRING STRING FUNC_DEF IF VAR VAR VAR VAR VAR VAR RETURN NUMBER IF VAR VAR VAR VAR RETURN NUMBER RETURN NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR IF VAR NUMBER EXPR FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR BIN_OP VAR NUMBER VAR NUMBER STRING ASSIGN 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...
s = input() vowels = "a", "e", "u", "o", "i" res = "" i = 0 while i < len(s) - 2: if ( s[i] not in vowels and s[i + 1] not in vowels and s[i + 2] not in vowels and s[i : i + 3] != s[i] * 3 ): res += s[i : i + 2] + " " i += 2 else: res += s[i] i...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING STRING STRING STRING STRING 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 VAR VAR BIN_OP VAR NUMBER BIN_OP VAR VAR NUMBER VAR BIN_OP VAR VAR BIN_OP VAR NUMBER STRING 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...
def main(): str = input() + " " vows = {"a", "e", "i", "o", "u"} idx = 0 res = [] while idx + 2 < len(str): if ( str[idx] not in vows and str[idx + 1] not in vows and str[idx + 2] not in vows and not str[idx] == str[idx + 1] == str[idx + 2] ...
FUNC_DEF ASSIGN VAR BIN_OP FUNC_CALL VAR STRING ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR LIST 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 BIN_OP VAR NUMBER EXPR FUNC_CALL VAR 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...
vowels = "aeiou" w = input() letter = "a" count = 0 single = True for c in w: if c in vowels: letter = c count = 0 single = True print(c, end="") else: if count > 0 and c != letter: single = False count += 1 letter = c if count >= 3 and...
ASSIGN VAR STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR VAR IF VAR VAR ASSIGN VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER EXPR FUNC_CALL VAR VAR STRING IF VAR NUMBER VAR VAR ASSIGN VAR NUMBER VAR NUMBER ASSIGN VAR VAR IF VAR NUMBER VAR ASSIGN VAR NUMBER ASSIGN 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() gl = ["a", "e", "i", "o", "u"] uk = 0 otv = "" for i in range(len(s)): if s[i] in gl: uk = 0 otv += s[i] else: uk += 1 if uk >= 3 and (s[i] != s[i - 1] or s[i] != s[i - 2]): uk = 1 otv += " " + s[i] else: otv += s[i] print(o...
ASSIGN VAR FUNC_CALL 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 ASSIGN VAR NUMBER VAR VAR VAR VAR NUMBER IF VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER VAR BIN_OP STRING 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() letters = ["a", "e", "i", "o", "u"] index = [] i = 0 while i < len(s) - 2: x = s[i] == s[i + 1] == s[i + 2] if ( s[i] not in letters and s[i + 1] not in letters and s[i + 2] not in letters and x == False ): index.append(i + 1) i += 2 else: ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR LIST 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 VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR NUMBER EXPR FUNC_CALL VAR BIN_OP 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...
vowels = {"a", "e", "i", "o", "u"} s = input() n = len(s) cur = [] ans = [] for c in s: if len(cur) < 2: cur.append(c) elif ( c not in vowels and cur[-1] not in vowels and cur[-2] not in vowels and len(set([c, cur[-1], cur[-2]])) != 1 ): ans.append("".join(cur...
ASSIGN VAR STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR ASSIGN VAR LIST ASSIGN VAR LIST FOR VAR VAR IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR VAR IF VAR VAR VAR NUMBER VAR VAR NUMBER VAR FUNC_CALL VAR FUNC_CALL VAR LIST VAR VAR NUMBER VAR NUMBER NUMBER 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() s2 = "" alp = "aeiou" i = 0 flag = 0 while i < len(s): if alp.find(s[i]) != -1: s2 += s[i] i += 1 flag = 0 else: flag += 1 if flag == 3: if s[i - 2] == s[i - 1] and s[i] == s[i - 1]: s2 += s[i] flag -= 1 ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF FUNC_CALL VAR VAR VAR NUMBER VAR VAR VAR VAR NUMBER ASSIGN VAR NUMBER VAR NUMBER IF VAR NUMBER IF VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR 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...
s = input() glas = "aeiou" i = 1 while i < len(s) - 1: if s[i - 1] not in glas and s[i] not in glas and s[i + 1] not in glas: if s[i - 1] != s[i] or s[i] != s[i + 1] or s[i - 1] != s[i + 1]: s = s[: i + 1] + " " + s[i + 1 :] i += 3 continue 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 BIN_OP VAR NUMBER VAR VAR VAR VAR VAR BIN_OP VAR NUMBER VAR IF VAR BIN_OP VAR NUMBER VAR VAR VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR BIN_OP VAR NUM...
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 = s[0] a = ["a", "e", "i", "o", "u"] i = 1 while i < len(s) - 1: d += s[i] if ( (not s[i] in a) & (not s[i + 1] in a) & (not s[i - 1] in a) & (not s[i] == s[i + 1] == s[i - 1]) ): d += " " + s[i + 1] i += 1 i += 1 if i < len(s): d += s[i]...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR VAR NUMBER ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER WHILE VAR BIN_OP FUNC_CALL VAR VAR NUMBER VAR VAR VAR IF BIN_OP BIN_OP BIN_OP VAR VAR VAR 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 BIN_OP...
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() s = "ywrtpsdfqghjklzxcvbnm" posl = 0 word_answer = "" otvet = 0 for i in range(len(string)): if s.find(string[i]) != -1: otvet += 1 else: otvet = 0 if otvet >= 3: if ( string[i] != string[i - 1] or string[i] != string[i - 2] or str...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF FUNC_CALL VAR VAR VAR NUMBER VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER 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 A...
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 = str(input()) n, count, count1, ans = len(x), 0, 0, [0] * 3001 for i in range(n): if x[i] in {"a", "e", "i", "o", "u"}: count = 0 else: count += 1 if count == 3: if x[i] == x[i - 1] == x[i - 2]: count = 2 else: ans[i - 1] = 1 ...
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR VAR VAR VAR FUNC_CALL VAR VAR NUMBER NUMBER BIN_OP LIST NUMBER NUMBER FOR VAR FUNC_CALL VAR VAR IF VAR VAR STRING STRING STRING STRING STRING ASSIGN VAR NUMBER VAR NUMBER IF VAR NUMBER IF VAR VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR B...
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 = "aieou" f = 0 k = 0 p = "" news = "" for i in range(len(s)): if s[i] not in g: k += 1 if k >= 3 and s[i] != p[-1]: news = news + " " + s[i] k = 1 p = s[i] elif k >= 3 and s[i] == p[-1]: if len(p) >= 2: if s[i] ==...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR VAR NUMBER IF VAR NUMBER VAR VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR STRING VAR VAR ASSIGN VAR NUMBER ASSIGN VAR VAR VAR IF VAR NUMBER 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(s): if s[0] == s[1] == s[2]: return False return True s = input() gl = ["a", "e", "i", "o", "u"] cnt = 0 last_letter = "" i = 0 while i < len(s): if s[i] not in gl: cnt += 1 else: cnt = 0 if cnt == 3: if check(s[i - 2 : i + 1]): s = s[:i] + " "...
FUNC_DEF IF VAR NUMBER VAR NUMBER VAR NUMBER RETURN NUMBER RETURN NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF VAR VAR VAR VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER IF FUNC_CALL VAR 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() s2 = s[0] gl = "aeiou" count = 0 mark = 0 if s[0] not in gl: count = 1 for i in range(1, len(s)): if s[i] not in gl: if count >= 2: if mark == 1 or s[i] != s[i - 1]: s2 += " " count = 1 mark = 0 else: if s[i] != ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR VAR NUMBER ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF VAR NUMBER VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER FUNC_CALL VAR VAR IF VAR VAR VAR IF VAR NUMBER IF VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER IF VAR VAR VAR B...
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...
word = input() output = "" v = ["a", "e", "i", "o", "u"] s = 0 while True: if s + 1 < len(word) and s + 2 < len(word): if ( v.count(word[s]) == 0 and v.count(word[s + 1]) == 0 and v.count(word[s + 2]) == 0 ): if len(set(word[s] + word[s + 1] + word[s +...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR STRING ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR NUMBER WHILE NUMBER IF BIN_OP VAR NUMBER FUNC_CALL VAR VAR BIN_OP VAR NUMBER FUNC_CALL VAR VAR IF FUNC_CALL VAR VAR VAR NUMBER FUNC_CALL VAR VAR BIN_OP VAR NUMBER NUMBER FUNC_CALL VAR VAR BIN_OP VAR NUMBER 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...
s = input() c = 0 d = 0 p = "" for i in s: if i == "a" or i == "e" or i == "i" or i == "o" or i == "u": c = 0 d = 0 p = "" else: c += 1 if c > 1: if p != "" and i not in p: d = 1 p += i if c >= 3 and d: print(" ", en...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR STRING FOR VAR VAR IF VAR STRING VAR STRING VAR STRING VAR STRING VAR STRING ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR STRING VAR NUMBER IF VAR NUMBER IF VAR STRING VAR VAR ASSIGN VAR NUMBER VAR VAR IF VAR NUMBER VAR EXPR FUNC_CALL 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...
string = input() l = len(string) string += " " consonents = "bcdfghjklmnpqrstvwxyz" vowels = "aeiou" output = "" if len(string) < 3: print(string) else: i = 0 while i < l: if string[i] in vowels or string[i + 1] in vowels or string[i + 2] in vowels: output += string[i] i += ...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR STRING ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR STRING IF FUNC_CALL VAR VAR NUMBER EXPR FUNC_CALL VAR VAR ASSIGN VAR NUMBER WHILE VAR VAR IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR VAR VAR VAR NUMBER IF VAR VAR VAR BIN_OP 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...
s = input() fl = False l1 = "" l2 = "" l = 0 gl = {"a", "e", "i", "o", "u"} for i in range(len(s)): if s[i] in gl: l1 = "" l2 = "" elif l2 == "": l2 = s[i] continue elif l1 == "": l1 = s[i] continue elif s[i] == l2 and s[i] == l1: continue else...
ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR STRING ASSIGN VAR STRING ASSIGN VAR NUMBER ASSIGN VAR STRING STRING STRING STRING STRING FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR VAR VAR ASSIGN VAR STRING ASSIGN VAR STRING IF VAR STRING ASSIGN VAR VAR VAR IF VAR STRING ASSIGN VAR VAR VAR IF VAR VAR VAR 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...
string = input() def sogl(ch): if ch != "a" and ch != "e" and ch != "i" and ch != "o" and ch != "u": return True return False fast = 0 for i in range(len(string)): if fast > 0: fast -= 1 continue if ( i < len(string) - 2 and not (string[i] == string[i + 1] and...
ASSIGN VAR FUNC_CALL VAR FUNC_DEF IF VAR STRING VAR STRING VAR STRING VAR STRING VAR STRING RETURN NUMBER RETURN NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR IF VAR NUMBER VAR NUMBER IF VAR BIN_OP FUNC_CALL VAR VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER VAR VAR VAR BIN_OP VAR NUMBER 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...
symbol = ["a", "e", "i", "o", "u"] a = input() i = 2 while i < len(a): if ( not a[i] in symbol and not a[i - 1] in symbol and not a[i - 2] in symbol and a[i - 2 : i + 1] != a[i - 2] * 3 ): a = a[:i] + " " + a[i:] i = i + 3 else: i = i + 1 print(a)
ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER WHILE VAR FUNC_CALL VAR VAR IF VAR VAR VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER BIN_OP VAR NUMBER BIN_OP VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR BIN_OP BIN_OP VAR VAR STRING VAR 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...
orph = ["a", "e", "i", "o", "u"] string = input() ctr = 0 out = "" for i, c in enumerate(string): if c in orph: ctr = 0 else: ctr += 1 if ctr > 2: if not (c == string[i - 1] and c == string[i - 2]): out = out + " " ctr = 1 out = out + c pri...
ASSIGN VAR LIST STRING STRING STRING STRING STRING ASSIGN VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR STRING FOR VAR VAR FUNC_CALL VAR VAR IF VAR VAR ASSIGN VAR NUMBER VAR NUMBER IF VAR NUMBER IF VAR VAR BIN_OP VAR NUMBER VAR VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP VAR STRING ASSIGN VAR NUMBER ASSIGN VAR BIN_OP VAR ...
You are given an array of integers $a_1, a_2, \ldots, a_n$ and an integer $x$. You need to select the maximum number of elements in the array, such that for every subsegment $a_l, a_{l + 1}, \ldots, a_r$ containing strictly more than one element $(l < r)$, either: At least one element on this subsegment is not select...
def Rep_Edges(n, l, x): i = 0 while i < n: l[i] = l[i] - x i = i + 1 ans = n j = -1 for i in range(1, n): if (i - 1 > j) & (l[i] + l[i - 1] < 0): ans = ans - 1 j = i elif (i - 2 > j) & (l[i] + l[i - 1] + l[i - 2] < 0): ans = ans - 1...
FUNC_DEF ASSIGN VAR NUMBER WHILE VAR VAR ASSIGN VAR VAR BIN_OP VAR VAR VAR ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR IF BIN_OP BIN_OP VAR NUMBER VAR BIN_OP VAR VAR VAR BIN_OP VAR NUMBER NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR VAR IF BIN_OP BIN_OP VAR NUMBER VA...
You are given an array of integers $a_1, a_2, \ldots, a_n$ and an integer $x$. You need to select the maximum number of elements in the array, such that for every subsegment $a_l, a_{l + 1}, \ldots, a_r$ containing strictly more than one element $(l < r)$, either: At least one element on this subsegment is not select...
def solver(): n = int(input()) for _ in range(n): len_input = int(input()) (*array,) = map(int, input().split()) x = int(input()) incriminated = set() for i in range(1, len_input): if i == 1: if array[i - 1] + array[i] < x * 2: ...
FUNC_DEF ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR NUMBER VAR IF VAR NUMBER IF BIN_OP VAR BIN_OP VAR NUMBER VAR VAR BIN...
You are given an array of integers $a_1, a_2, \ldots, a_n$ and an integer $x$. You need to select the maximum number of elements in the array, such that for every subsegment $a_l, a_{l + 1}, \ldots, a_r$ containing strictly more than one element $(l < r)$, either: At least one element on this subsegment is not select...
for _ in range(int(input())): n = int(input()) a = list(map(int, input().split())) x = int(input()) ans = 0 for i in range(n): a[i] -= x sa = [a[0]] for i in range(1, n): sa.append(sa[-1] + a[i]) i = 1 l = a[0] while i < n: if l + a[i] < 0: ans...
FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR VAR VAR VAR ASSIGN VAR LIST VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR EXPR FUNC...
You are given an array of integers $a_1, a_2, \ldots, a_n$ and an integer $x$. You need to select the maximum number of elements in the array, such that for every subsegment $a_l, a_{l + 1}, \ldots, a_r$ containing strictly more than one element $(l < r)$, either: At least one element on this subsegment is not select...
tt = int(input()) for TC in range(tt): n = int(input()) a = [int(x) for x in input().split()] x = int(input()) for i in range(n): a[i] -= x v = [] for i in range(1, n): if a[i] + a[i - 1] < 0: v.append((i, 2)) for i in range(2, n): if ( a[i] + ...
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR VAR VAR VAR ASSIGN VAR LIST FOR VAR FUNC_CALL VAR NUMBER VAR IF BIN_OP VAR VAR VAR BIN_OP VAR ...
You are given an array of integers $a_1, a_2, \ldots, a_n$ and an integer $x$. You need to select the maximum number of elements in the array, such that for every subsegment $a_l, a_{l + 1}, \ldots, a_r$ containing strictly more than one element $(l < r)$, either: At least one element on this subsegment is not select...
D = input C = int for H in range(C(D())): I = C(D()) B = list(map(C, D().split())) G = C(D()) B = [(A - G) for A in B] A = 10**18 E = 0 for F in B: A += F if A < 0: A = 10**18 else: E += 1 A = min(A, F) print(E)
ASSIGN VAR VAR ASSIGN VAR VAR FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP VAR VAR VAR VAR ASSIGN VAR BIN_OP NUMBER NUMBER ASSIGN VAR NUMBER FOR VAR VAR...
You are given an array of integers $a_1, a_2, \ldots, a_n$ and an integer $x$. You need to select the maximum number of elements in the array, such that for every subsegment $a_l, a_{l + 1}, \ldots, a_r$ containing strictly more than one element $(l < r)$, either: At least one element on this subsegment is not select...
t = int(input()) for _ in range(t): n = int(input()) a = list(map(int, input().split())) x = int(input()) ans = 0 Sum = 2e18 for i in a: Sum += i - x if Sum < 0: Sum = 2e18 else: Sum = min(Sum, i - x) ans += 1 print(ans)
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR VAR VAR BIN_OP VAR VAR IF VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR ...
You are given an array of integers $a_1, a_2, \ldots, a_n$ and an integer $x$. You need to select the maximum number of elements in the array, such that for every subsegment $a_l, a_{l + 1}, \ldots, a_r$ containing strictly more than one element $(l < r)$, either: At least one element on this subsegment is not select...
for _ in range(int(input())): n = int(input()) a = list(map(int, input().split())) x = int(input()) a = [(c - x) for c in a] begin = True unchosen = 0 sum = 0 for i in range(n): if begin: sum = a[i] begin = False else: sum += a[i] ...
FOR VAR FUNC_CALL VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP VAR VAR VAR VAR ASSIGN VAR NUMBER ASSIGN VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR IF VAR ASSI...
You are given an array of integers $a_1, a_2, \ldots, a_n$ and an integer $x$. You need to select the maximum number of elements in the array, such that for every subsegment $a_l, a_{l + 1}, \ldots, a_r$ containing strictly more than one element $(l < r)$, either: At least one element on this subsegment is not select...
t = int(input()) for i in range(t): n = int(input()) l = list(map(int, input().split())) x = int(input()) for i in range(n): l[i] -= x l1 = [0] m = 0 for i in range(n): m += l[i] l1.append(m) high = -1000000 high1 = -1000000 h1 = -1 m = 0 cur = 0 ...
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR FOR VAR FUNC_CALL VAR VAR VAR VAR VAR ASSIGN VAR LIST NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR VAR VAR V...
You are given an array of integers $a_1, a_2, \ldots, a_n$ and an integer $x$. You need to select the maximum number of elements in the array, such that for every subsegment $a_l, a_{l + 1}, \ldots, a_r$ containing strictly more than one element $(l < r)$, either: At least one element on this subsegment is not select...
import sys input = sys.stdin.readline def ri(): return int(input()) def rf(): return list(map(float, input().split())) def rl(): return list(map(int, input().split())) def rs(): return input().rstrip() def out_list(x): return " ".join(map(str, x)) def solve_case(): n = ri() A = ...
IMPORT ASSIGN VAR VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL VAR FUNC_CALL VAR VAR FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL FUNC_CALL VAR FUNC_DEF RETURN FUNC_CALL STRING FUNC_CALL VAR VAR VAR FUNC_DEF ASSIGN...
Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys... It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of w...
def fine(): f, c, n = 1, 1, 1 yield 0 while True: yield f n += 1 c = c * (4 * n - 6) // n f = (c - f) // 2 f = fine() n = int(input()) print((sum(next(f) for _ in range(n + 3)) - 1) % (10**9 + 7))
FUNC_DEF ASSIGN VAR VAR VAR NUMBER NUMBER NUMBER EXPR NUMBER WHILE NUMBER EXPR VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR BIN_OP BIN_OP NUMBER VAR NUMBER VAR ASSIGN VAR BIN_OP BIN_OP VAR VAR NUMBER ASSIGN VAR FUNC_CALL VAR ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR EXPR FUNC_CALL VAR BIN_OP BIN_OP FUNC_CALL VAR FUNC_CALL ...
Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys... It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of w...
n = int(input()) dp = [[([0] * (n + 1)) for i in range(n + 1)] for j in range(2)] dp[0][0][0] = 0 dp[1][0][0] = 0 mod = 10**9 + 7 for i in range(n + 1): for j in range(i, n + 1): if i == 0 and j == 0: continue dp[0][i][j] = (dp[1][i - 1][j] + dp[1][i][j - 1]) % mod tmp1 = 1 ...
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER VAR FUNC_CALL VAR NUMBER ASSIGN VAR NUMBER NUMBER NUMBER NUMBER ASSIGN VAR NUMBER NUMBER NUMBER NUMBER ASSIGN VAR BIN_OP BIN_OP NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR BIN_OP VAR NUMBER FOR VAR ...
Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys... It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of w...
import sys input = sys.stdin.readline sys.setrecursionlimit(10**7) n = int(input()) mod = 10**9 + 7 ANS = [([0] * (n + 1)) for i in range(n + 1)] def bra(x, y): if ANS[x][y] != 0: return ANS[x][y] if x == y == 0: ANS[x][y] = 0 return 0 if (x + y) % 2 == 1: A = 1 else: ...
IMPORT ASSIGN VAR VAR EXPR FUNC_CALL VAR BIN_OP NUMBER NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP BIN_OP NUMBER NUMBER NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER FUNC_DEF IF VAR VAR VAR NUMBER RETURN VAR VAR VAR IF VAR VAR NUMBER ASSIGN VAR VAR VAR NU...
Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys... It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of w...
n = int(input()) dp = [[(0) for i in range(2005)] for j in range(2005)] ans, mod = 0, 10**9 + 7 dp[1][1] = 1 for i in range(1, 2 * n): for j in range(2 * n): dp[i + 1][j + 1] += dp[i][j] if dp[i + 1][j + 1] >= mod: dp[i + 1][j + 1] -= mod if j > 0: dp[i + 1][j - 1] +=...
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR NUMBER VAR FUNC_CALL VAR NUMBER VAR FUNC_CALL VAR NUMBER ASSIGN VAR VAR NUMBER BIN_OP BIN_OP NUMBER NUMBER NUMBER ASSIGN VAR NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP NUMBER VAR FOR VAR FUNC_CALL VAR BIN_OP NUMBER VAR VAR BIN_OP VAR NUMBER BIN_OP VAR NUMB...
Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys... It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of w...
n = int(input()) board = [[(0) for i in range(n + 1)] for j in range(2 * n + 1)] board[0][0] = 1 for i in range(1, n): for j in range(len(board[0])): if j > 0: board[i][j - 1] += board[i - 1][j] if j + 1 < len(board[0]) and j < 2 * n - i: board[i][j + 1] += board[i - 1][j] fo...
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER VAR FUNC_CALL VAR BIN_OP BIN_OP NUMBER VAR NUMBER ASSIGN VAR NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER VAR FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR NUMBER IF VAR NUMBER VAR VAR BIN_OP VAR NUMBER VAR BIN_OP VAR NUMBER VAR...
Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys... It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of w...
import sys sys.setrecursionlimit(10**9) def fun(plus, cnt): if check[plus][cnt]: return check[plus][cnt] val = 0 if plus < n and 2 * n - cnt > plus: val += fun(plus + 1, cnt + 1) if plus > 0: val += fun(plus - 1, cnt + 1) check[plus][cnt] = val if cnt % 2: chec...
IMPORT EXPR FUNC_CALL VAR BIN_OP NUMBER NUMBER FUNC_DEF IF VAR VAR VAR RETURN VAR VAR VAR ASSIGN VAR NUMBER IF VAR VAR BIN_OP BIN_OP NUMBER VAR VAR VAR VAR FUNC_CALL VAR BIN_OP VAR NUMBER BIN_OP VAR NUMBER IF VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR VAR VAR VAR IF BIN_OP VAR NUMBER VA...
Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys... It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of w...
from itertools import accumulate N = int(input()) arr = [1] res = 1 for i in range(2, N + 1): arr = list(accumulate(arr)) arr = arr + [arr[-1]] d = i + 1 s = 0 for i in range(len(arr)): s += arr[i] * (d // 2) d -= 1 res += s res = res % 1000000007 print(res)
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR LIST NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR VAR ASSIGN VAR BIN_OP VAR LIST VAR NUMBER ASSIGN VAR BIN_OP VAR NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR FUNC_CALL VAR VAR VAR BIN_OP VAR VAR BIN_OP...
Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys... It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of w...
n = int(input()) f = [([0] * (n + 1)) for i in range(n + 1)] g = [([0] * (n + 1)) for i in range(n + 1)] mod = 10**9 + 7 for i in range(1, n + 1): f[0][i] = g[0][i - 1] g[0][i] = f[0][i - 1] + 1 t = [0, 0] for i in range(1, n + 1): for j in range(i, n + 1): if i > 0: f[i][j] = g[i - 1][j...
ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP LIST NUMBER BIN_OP VAR NUMBER VAR FUNC_CALL VAR BIN_OP VAR NUMBER ASSIGN VAR BIN_OP BIN_OP NUMBER NUMBER NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP VAR NUMBER ASSIGN VAR NUMBER VA...
Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys... It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of w...
import sys u = 1000000007 def P(n): X = [[(0) for i in range(2 * n + 1)] for j in range(2 * n + 1)] X[0][0] = 1 r = 0 for i in range(1, 2 * n + 1): X[i][0] = X[i - 1][1] for j in range(1, min([2 * n + 1 - i, i + 1])): X[i][j] = (X[i - 1][j + 1] + X[i - 1][j - 1]) % u ...
IMPORT ASSIGN VAR NUMBER FUNC_DEF ASSIGN VAR NUMBER VAR FUNC_CALL VAR BIN_OP BIN_OP NUMBER VAR NUMBER VAR FUNC_CALL VAR BIN_OP BIN_OP NUMBER VAR NUMBER ASSIGN VAR NUMBER NUMBER NUMBER ASSIGN VAR NUMBER FOR VAR FUNC_CALL VAR NUMBER BIN_OP BIN_OP NUMBER VAR NUMBER ASSIGN VAR VAR NUMBER VAR BIN_OP VAR NUMBER NUMBER FOR VA...
Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys... It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of w...
mod = 1000000007 n = int(input()) cat = [0] * 1100 f, c, i = 1, 1, 1 while i < 1100: cat[i] = f i += 1 c = c * (8 * i - 12) // i f = c - f cat = cat[1:-1] sm = 0 for i in range(3, n + 3): sm += (cat[i - 1] + (-1) ** (i - 1)) // (1 << i) print(sm % mod)
ASSIGN VAR NUMBER ASSIGN VAR FUNC_CALL VAR FUNC_CALL VAR ASSIGN VAR BIN_OP LIST NUMBER NUMBER ASSIGN VAR VAR VAR NUMBER NUMBER NUMBER WHILE VAR NUMBER ASSIGN VAR VAR VAR VAR NUMBER ASSIGN VAR BIN_OP BIN_OP VAR BIN_OP BIN_OP NUMBER VAR NUMBER VAR ASSIGN VAR BIN_OP VAR VAR ASSIGN VAR VAR NUMBER NUMBER ASSIGN VAR NUMBER F...