content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
#!/usr/bin/env python # coding: utf-8 # In[3]: class ChineseChef: def make_chicken(self): print("The Chef makes Chicken") def make_salad(self): print("The Chef Makes Salad") def make_special_dish(self): print("The Chef makes Orange Chicken") def make_fried_rice(self): ...
class Chinesechef: def make_chicken(self): print('The Chef makes Chicken') def make_salad(self): print('The Chef Makes Salad') def make_special_dish(self): print('The Chef makes Orange Chicken') def make_fried_rice(self): print('The Chef maked Fried Rice')
Experiment(description='Multi d regression experiment', data_dir='../data/uci-regression', max_depth=20, random_order=False, k=1, debug=False, local_computation=False, n_rand=2, sd=2, jitter_sd=0.1, max_job...
experiment(description='Multi d regression experiment', data_dir='../data/uci-regression', max_depth=20, random_order=False, k=1, debug=False, local_computation=False, n_rand=2, sd=2, jitter_sd=0.1, max_jobs=400, verbose=False, make_predictions=False, skip_complete=True, results_dir='../results/2014-04-21-uci-regressio...
N, S = map(int, input().split()) ans = 0 for i in range(1, N+1): for j in range(1, N+1): if i + j <= S: ans += 1 print(ans)
(n, s) = map(int, input().split()) ans = 0 for i in range(1, N + 1): for j in range(1, N + 1): if i + j <= S: ans += 1 print(ans)
class Model(object): __db = None __cache_engine = None @classmethod def set_db(cls, db): cls.__db = db\ @classmethod def get_db(cls): return cls.__db @property def db(self): return self.__db @classmethod def set_cache_engine(cls, cache_engine): ...
class Model(object): __db = None __cache_engine = None @classmethod def set_db(cls, db): cls.__db = db @classmethod def get_db(cls): return cls.__db @property def db(self): return self.__db @classmethod def set_cache_engine(cls, cache_engine): ...
# Using third argument in range lst = [x for x in range(2,21,2)] print(lst) # Without using third argument in range lst1 = [x for x in range(1,21) if(x%2 == 0)] print(lst1)
lst = [x for x in range(2, 21, 2)] print(lst) lst1 = [x for x in range(1, 21) if x % 2 == 0] print(lst1)
COLUMNS = [ 'tipo_registro', 'nro_pv', 'nro_rv', 'dt_rv', 'bancos', 'nro_parcela', 'vl_parcela_bruto', 'vl_desconto_sobre_parcela', 'vl_parcela_liquida', 'dt_credito', 'livre' ]
columns = ['tipo_registro', 'nro_pv', 'nro_rv', 'dt_rv', 'bancos', 'nro_parcela', 'vl_parcela_bruto', 'vl_desconto_sobre_parcela', 'vl_parcela_liquida', 'dt_credito', 'livre']
# 1. Write a line of Python code that displays the sum of 468 + 751 print(0.7 * (220-33) +0.3 * 55) print(0.8 * (225-33) +0.35 * 55)
print(0.7 * (220 - 33) + 0.3 * 55) print(0.8 * (225 - 33) + 0.35 * 55)
# https://leetcode.com/problems/insert-into-a-binary-search-tree/ # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def insertIntoBST(self, root: TreeNode, v...
class Solution: def insert_into_bst(self, root: TreeNode, val: int) -> TreeNode: def insert(root, node): if root is None: root = node elif root.val < node.val: if root.right is None: root.right = node else: ...
#1 f = open('Grade2.txt', "a") Score = open('Score1.txt',"r") g=0 ll = Score.readline() while ll != "": l = ll.split(",") #print(l) eee = l[4][0:2] e = int(eee) if g <= e: g=e else: g=g ll = Score.readline() print(ll) f.write(str(g)) f.close() Score.close()
f = open('Grade2.txt', 'a') score = open('Score1.txt', 'r') g = 0 ll = Score.readline() while ll != '': l = ll.split(',') eee = l[4][0:2] e = int(eee) if g <= e: g = e else: g = g ll = Score.readline() print(ll) f.write(str(g)) f.close() Score.close()
def multiplyTwoList(head1, head2): # Code here a="" b="" temp1=head1 while temp1!=None: a+=str(temp1.data) temp1=temp1.next # print a temp2=head2 while temp2!=None: b+=str(temp2.data) temp2=temp2.next # print b return (int(a)*int(b))%MOD
def multiply_two_list(head1, head2): a = '' b = '' temp1 = head1 while temp1 != None: a += str(temp1.data) temp1 = temp1.next temp2 = head2 while temp2 != None: b += str(temp2.data) temp2 = temp2.next return int(a) * int(b) % MOD
''' Created on Sep 22, 2012 @author: Jason ''' class DatasetError(Exception): ''' I will use this class to raise dataset-related exceptions. Common errors: Empty datasets provided, datasets with wrong number of features, datasets lacking some feature or labels, etc Used the ready-baked ...
""" Created on Sep 22, 2012 @author: Jason """ class Dataseterror(Exception): """ I will use this class to raise dataset-related exceptions. Common errors: Empty datasets provided, datasets with wrong number of features, datasets lacking some feature or labels, etc Used the ready-baked template on...
class App(object): @property def ScreenWidth(self): return 1024 @property def ScreenHeight(self): return 768
class App(object): @property def screen_width(self): return 1024 @property def screen_height(self): return 768
#!/usr/bin/env python one_kb = 1024 def to_mega_byte(data_size): return (data_size * one_kb) * 1024 def calculate_symbol_size(generation_size, data_size): return data_size / generation_size def encoding_calculate(generation_size, symbols_size): return generation_size * symbol_size
one_kb = 1024 def to_mega_byte(data_size): return data_size * one_kb * 1024 def calculate_symbol_size(generation_size, data_size): return data_size / generation_size def encoding_calculate(generation_size, symbols_size): return generation_size * symbol_size
length = 21 for i in range(length): for j in range(length): if (i == j): print('*', end="") elif (i == length-1-j): print('*', end="") elif (j == length//2 and i > length//10 and i < 0.9*length ): print('*', end="") else: print(' ', e...
length = 21 for i in range(length): for j in range(length): if i == j: print('*', end='') elif i == length - 1 - j: print('*', end='') elif j == length // 2 and i > length // 10 and (i < 0.9 * length): print('*', end='') else: print(' '...
def max_window_sum(arr,w_size): if len(arr) < w_size: return None running_sum = run_index = 0 max_val = float("-inf") for item in range(w_size): running_sum += arr[item] for item in range (w_size , len(arr)): if running_sum > max_val: max_val = running_sum running_sum -= arr[run_index] running_sum ...
def max_window_sum(arr, w_size): if len(arr) < w_size: return None running_sum = run_index = 0 max_val = float('-inf') for item in range(w_size): running_sum += arr[item] for item in range(w_size, len(arr)): if running_sum > max_val: max_val = running_sum ...
# # PySNMP MIB module RADLAN-PIM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RADLAN-PIM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:39:06 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, single_value_constraint, value_range_constraint, value_size_constraint, constraints_union) ...
class TagAdditionsEnum: TAG_NAME = "name" TAG_SMILES = "smiles" TAG_ORIGINAL_SMILES = "original_smiles" TAG_LIGAND_ID = "ligand_id" # try to find the internal value and return def __getattr__(self, name): if name in self: return name raise AttributeError # pro...
class Tagadditionsenum: tag_name = 'name' tag_smiles = 'smiles' tag_original_smiles = 'original_smiles' tag_ligand_id = 'ligand_id' def __getattr__(self, name): if name in self: return name raise AttributeError def __setattr__(self, key, value): raise value_...
class Paren: def __init__(self, paren): if paren == '(': LParen() @staticmethod def getParen(paren): if paren == '(': return LParen() elif paren == ')': return RParen() elif paren == '{': return LBrace() elif paren == '}': return RBrace() def __str__...
class Paren: def __init__(self, paren): if paren == '(': l_paren() @staticmethod def get_paren(paren): if paren == '(': return l_paren() elif paren == ')': return r_paren() elif paren == '{': return l_brace() elif pare...
# Escreva um algoritmo para ler um valor (do teclado) e escrever (na tela) o seu antecessor. (SOMENTE NUMERO INTEIRO) num = int(input('Digite um valor na tela: ')) res = num - 1 print(res)
num = int(input('Digite um valor na tela: ')) res = num - 1 print(res)
class Wotd(): def __init__( self, definition: str, englishExample: str, foreignExample: str, language: str, transliteration: str, word: str ): if definition is None or len(definition) == 0 or definition.isspace(): raise ValueError( ...
class Wotd: def __init__(self, definition: str, englishExample: str, foreignExample: str, language: str, transliteration: str, word: str): if definition is None or len(definition) == 0 or definition.isspace(): raise value_error(f'definition argument is malformed: "{definition}"') elif l...
n = int(input("Enter n: ")) x = 2 y = 2 x1 = 0 flag = False ''' Gives false at 2 and 3 because powers start from 2''' if n == 1: print("Output: True\n" + str(n) + " can be expressed as " + str(1) + "^(0, 1, 2, 3, 4, 5, ......)") else: while x <= n: #print(x) while x1 < n: ...
n = int(input('Enter n: ')) x = 2 y = 2 x1 = 0 flag = False ' Gives false at 2 and 3 because powers start from 2' if n == 1: print('Output: True\n' + str(n) + ' can be expressed as ' + str(1) + '^(0, 1, 2, 3, 4, 5, ......)') else: while x <= n: while x1 < n: x1 = x ** y if x1 == ...
SECRET_KEY = 'Software_Fellowship_Day_4' DEBUG = True ENV = 'development' API_KEY = "API_KEY_GOES_HERE"
secret_key = 'Software_Fellowship_Day_4' debug = True env = 'development' api_key = 'API_KEY_GOES_HERE'
def output(): test_case = int(input()) if 2 <= test_case <= 99: for i in range(test_case): i_put = input() print('gzuz') if __name__ == '__main__': output()
def output(): test_case = int(input()) if 2 <= test_case <= 99: for i in range(test_case): i_put = input() print('gzuz') if __name__ == '__main__': output()
# DFS class Solution: def findCircleNum(self, M: List[List[int]]) -> int: res = 0 visited = [0]*len(M) for i in range(len(M)): if visited[i] == 0: res += 1 visited[i] = 1 self.dfs(M, i, visited) return res ...
class Solution: def find_circle_num(self, M: List[List[int]]) -> int: res = 0 visited = [0] * len(M) for i in range(len(M)): if visited[i] == 0: res += 1 visited[i] = 1 self.dfs(M, i, visited) return res def dfs(self, ...
# Python type a = 'Python is a great language.' b = 10 c = 2.5 d = {a, b, c} e = [a, b, c] f = (a, b, c) g = {"a":b, "a":c} h = b > c i = 3 + 4j ''' print('a =',a,type(a)) print('b =',b,type(b)) print('c =',c,type(c)) print('d =',d,type(d)) print('e =',e,type(e)) print('f =',f,type(f)) print('g =',g,type(g)) print('h...
a = 'Python is a great language.' b = 10 c = 2.5 d = {a, b, c} e = [a, b, c] f = (a, b, c) g = {'a': b, 'a': c} h = b > c i = 3 + 4j "\nprint('a =',a,type(a))\nprint('b =',b,type(b))\nprint('c =',c,type(c))\nprint('d =',d,type(d))\nprint('e =',e,type(e))\nprint('f =',f,type(f))\nprint('g =',g,type(g))\nprint('h =',h,ty...
class ValidationError(Exception): def __init__(self, message, errors): super().__init__(message) self.message = message self.errors = errors def __errPrint__(self, foo, space=' '): ''' Function to petty print the error from cerberus. ''' error = '' ...
class Validationerror(Exception): def __init__(self, message, errors): super().__init__(message) self.message = message self.errors = errors def __err_print__(self, foo, space=' '): """ Function to petty print the error from cerberus. """ error = '' ...
class TestInstitutionsSearch: def test_institutions_search(self, client): res = client.get("/institutions?search=university") json_data = res.get_json() assert "university" in json_data["results"][0]["display_name"].lower() for result in json_data["results"][:25]: assert ...
class Testinstitutionssearch: def test_institutions_search(self, client): res = client.get('/institutions?search=university') json_data = res.get_json() assert 'university' in json_data['results'][0]['display_name'].lower() for result in json_data['results'][:25]: assert...
start_year = int(input()) current_year = start_year + 1 found = False while True: not_found = False for fi in range(len(str(current_year))): for si in range(fi + 1, len(str(current_year))): fd = str(current_year)[fi] sd = str(current_year)[si] if fd == sd: ...
start_year = int(input()) current_year = start_year + 1 found = False while True: not_found = False for fi in range(len(str(current_year))): for si in range(fi + 1, len(str(current_year))): fd = str(current_year)[fi] sd = str(current_year)[si] if fd == sd: ...
def fat (n): fat = 1 while (n > 1): fat = fat * n n -= 1 return fat def test_fat0 (): assert fat (0)==1
def fat(n): fat = 1 while n > 1: fat = fat * n n -= 1 return fat def test_fat0(): assert fat(0) == 1
# --------------------------------------------------------------------------------> Rotation class Rotation: def __init__(self, start_line, end_line, rotation_center=None): self.type = "Rotation" self.start_line = start_line self.end_line = end_line self.rotation_center = rotation_ce...
class Rotation: def __init__(self, start_line, end_line, rotation_center=None): self.type = 'Rotation' self.start_line = start_line self.end_line = end_line self.rotation_center = rotation_center def __repr__(self): return 'Rotation(start_line={}, end_line={}, rotation_...
# todo: make this configurable EXCHANGE_CRONOS_BLOCKCHAIN = "Cronos" CUR_CRONOS = "CRO" MILLION = 100000000.0 CURRENCIES = { "ibc/14F9BC3E44B8A9C1BE1FB08980FAB87034C9905EF17CF2F5008FC085218811CC": "OSMO", "ibc/EB2CED20AB0466F18BE49285E56B31306D4C60438A022EA995BA65D5E3CF7E09": "SCRT", "ibc/FA0006F056DB6719B8...
exchange_cronos_blockchain = 'Cronos' cur_cronos = 'CRO' million = 100000000.0 currencies = {'ibc/14F9BC3E44B8A9C1BE1FB08980FAB87034C9905EF17CF2F5008FC085218811CC': 'OSMO', 'ibc/EB2CED20AB0466F18BE49285E56B31306D4C60438A022EA995BA65D5E3CF7E09': 'SCRT', 'ibc/FA0006F056DB6719B8C16C551FC392B62F5729978FC0B125AC9A432DBB2AA1...
with plt.xkcd(): plt.figure(figsize=(8,6)) ##################################### ## determine which variables you want to look at, replace question marks # determine which variables you want to look at, replace question marks plt.hist(s_ves, label='a', alpha=0.5) # set the first argument here plt.hist(s_o...
with plt.xkcd(): plt.figure(figsize=(8, 6)) plt.hist(s_ves, label='a', alpha=0.5) plt.hist(s_opt, label='b', alpha=0.5) plt.legend(facecolor='xkcd:white') plt.show()
# Create a new class level variable called person_counter # Create a property called person_id and return a unique ID for each person object class Person: def __init__(self, first_name: str, last_name: str): self.__first_name = first_name self.__last_name = last_name @property def full_na...
class Person: def __init__(self, first_name: str, last_name: str): self.__first_name = first_name self.__last_name = last_name @property def full_name(self): return f'{self.__first_name} {self.__last_name}' new_person = person('Luke', 'Edmunds') print(newPerson.full_name) print(new...
class Stack: def __init__(self): self.stack = [] def empty(self): return len(self.stack) == 0 def peek(self): return self.stack[-1] def push(self, x): self.stack.append(x) def pop(self): del self.stack[-1] class Queue: def __ini...
class Stack: def __init__(self): self.stack = [] def empty(self): return len(self.stack) == 0 def peek(self): return self.stack[-1] def push(self, x): self.stack.append(x) def pop(self): del self.stack[-1] class Queue: def __init__(self): se...
class Solution: def hasAllCodes(self, s: str, k: int) -> bool: sub_s = set() for i in range(0, len(s) - k + 1): sub_s.add(s[i:i+k]) return True if len(sub_s) == 2**k else False
class Solution: def has_all_codes(self, s: str, k: int) -> bool: sub_s = set() for i in range(0, len(s) - k + 1): sub_s.add(s[i:i + k]) return True if len(sub_s) == 2 ** k else False
# Let's just use the local mongod instance. Edit as needed. # Please note that MONGO_HOST and MONGO_PORT could very well be left # out as they already default to a bare bones local 'mongod' instance. #MONGO_HOST = 'localhost' #MONGO_PORT = 27017 # Skip these if your db has no auth. But it really should. #MONG...
elasticsearch_url = 'http://maurice-vm.epa.ie:9200/' elasticsearch_index = 'eric' resource_methods = ['GET'] item_methods = ['GET'] description = ('Description of the user resource',) schema = {'measurementid': {'type': 'int32'}, 'locationname': {'type': 'string'}, 'latitude_dec': {'type': 'double'}, 'longitude_dec': {...
n=int(input()); res="" for _ in range(n): car=int(input()) opt=int(input()) for _ in range(opt): a,b=map(int, input().split()) car+=a*b res+=str(car)+"\n" print(res)
n = int(input()) res = '' for _ in range(n): car = int(input()) opt = int(input()) for _ in range(opt): (a, b) = map(int, input().split()) car += a * b res += str(car) + '\n' print(res)
HEADER = '''<!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="manifest" href...
header = '<!doctype html>\n<html class="no-js" lang="">\n\n<head>\n <meta charset="utf-8">\n <meta http-equiv="x-ua-compatible" content="ie=edge">\n <title></title>\n <meta name="description" content="">\n <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">\n\n <link rel="manife...
# A recursive implementation of Binary Search def recBinarySearch(target, theValues, first, last): # If the sequence of values cannot be subdivided further, # we are done if last <= first: # BASE CASE #1 return False else: # Find the midpoint of the sequence mid = (first + las...
def rec_binary_search(target, theValues, first, last): if last <= first: return False else: mid = (first + last) // 2 if theValues[mid] == target: return True elif target < theValues[mid]: return rec_binary_search(target, theValues, first, mid - 1) ...
# # PySNMP MIB module ZYXEL-XGS4728F-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/local/share/snmp/ZYXEL-XGS-4728F.my # Produced by pysmi-0.0.7 at Fri Feb 17 12:27:14 2017 # On host e0f449e7a145 platform Linux version 4.4.0-62-generic by user root # Using Python version 3.5.3 (default, Feb 10 2017, 02:09:54) ...
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, constraints_intersection, value_range_constraint, single_value_constraint, constraints_union) ...
def validate(number): if not 0 < number <= 64: raise ValueError("Invalid input!") def square(number): validate(number) return 2 ** (number - 1) def total(number): validate(number) return sum(square(i + 1) for i in range(number))
def validate(number): if not 0 < number <= 64: raise value_error('Invalid input!') def square(number): validate(number) return 2 ** (number - 1) def total(number): validate(number) return sum((square(i + 1) for i in range(number)))
DB_NAME = "defaultdb" DB_USER = "postgres" SESSIONSDB_HOST = '127.0.0.1' SESSIONSDB_PORT = 6379 SESSIONSDB_PASSWD = None SESSIONSDB_NO = 1 # SMTP MD_HOST = '127.0.0.1' MD_PORT = 10000 MD_USERNAME = None MD_KEY = '' class API_LOGGER: ENABLED = False
db_name = 'defaultdb' db_user = 'postgres' sessionsdb_host = '127.0.0.1' sessionsdb_port = 6379 sessionsdb_passwd = None sessionsdb_no = 1 md_host = '127.0.0.1' md_port = 10000 md_username = None md_key = '' class Api_Logger: enabled = False
inpt = [] while True: try: inpt.append(int(input())) except EOFError: break even = lambda x: True if x % 2 == 0 else False l = lambda lst: list(map(even, inpt)) print(l(inpt))
inpt = [] while True: try: inpt.append(int(input())) except EOFError: break even = lambda x: True if x % 2 == 0 else False l = lambda lst: list(map(even, inpt)) print(l(inpt))
#/usr/bin/python3 class Car() : def __init__(self) : print("This is class named car") car = Car() class ChinaCar(Car) : def __init__(self, name) : self.__name__ = name print("China car named ", name) china_car = ChinaCar("byd") class FlyCar(Car) : def __init__(self) : ...
class Car: def __init__(self): print('This is class named car') car = car() class Chinacar(Car): def __init__(self, name): self.__name__ = name print('China car named ', name) china_car = china_car('byd') class Flycar(Car): def __init__(self): super().__init__() @pr...
# # PySNMP MIB module CISCO-UNIFIED-COMPUTING-FC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-UNIFIED-COMPUTING-FC-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:59:25 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python ...
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_size_constraint, value_range_constraint, constraints_intersection, single_value_constraint) ...
def heapSort(self): heap = hp.Heap() heap.createHeap(*self.arr) i = 0 while(heap.size > 0): self.arr[i] = heap.delete() i += 1
def heap_sort(self): heap = hp.Heap() heap.createHeap(*self.arr) i = 0 while heap.size > 0: self.arr[i] = heap.delete() i += 1
text = input() new = "@" dash = "-" save = [] command = input() while command != "Complete": conversion = command.split(" ") if conversion[0] == "Make": if conversion[1] == "Upper": conv = text.upper() text = conv print(conv) elif conversion[1...
text = input() new = '@' dash = '-' save = [] command = input() while command != 'Complete': conversion = command.split(' ') if conversion[0] == 'Make': if conversion[1] == 'Upper': conv = text.upper() text = conv print(conv) elif conversion[1] == 'Lower': ...
L3_attention_mse=[{"layer_T":4, "layer_S":1, "feature":"attention", "loss":"attention_mse", "weight":1}, {"layer_T":8, "layer_S":2, "feature":"attention", "loss":"attention_mse", "weight":1}, {"layer_T":12, "layer_S":3, "feature":"attention", "loss":"attention_mse", "weight":1}] L...
l3_attention_mse = [{'layer_T': 4, 'layer_S': 1, 'feature': 'attention', 'loss': 'attention_mse', 'weight': 1}, {'layer_T': 8, 'layer_S': 2, 'feature': 'attention', 'loss': 'attention_mse', 'weight': 1}, {'layer_T': 12, 'layer_S': 3, 'feature': 'attention', 'loss': 'attention_mse', 'weight': 1}] l3_attention_ce = [{'la...
class TableEntryPJC: def __init__(self, rli, wi, rlj, wj, rlij, wij): self.rli = rli self.rlj = rlj self.rlij = rlij self.wi = wi self.wj = wj self.wij = wij def __str__(self): res = "" res = res + " " + str(self.rli) + " : " + str(self.wi) + "\n"...
class Tableentrypjc: def __init__(self, rli, wi, rlj, wj, rlij, wij): self.rli = rli self.rlj = rlj self.rlij = rlij self.wi = wi self.wj = wj self.wij = wij def __str__(self): res = '' res = res + ' ' + str(self.rli) + ' : ' + str(self.wi) + '\n...
def pagesNumberingWithInk(current, numberOfDigits): currentNumberOfDigits = len(str(current)) while numberOfDigits >= currentNumberOfDigits: numberOfDigits -= currentNumberOfDigits current += 1 currentNumberOfDigits = len(str(current)) return current-1 if __name__ == '__main__': input0 = [1, 21, 8, 21, 76, 8...
def pages_numbering_with_ink(current, numberOfDigits): current_number_of_digits = len(str(current)) while numberOfDigits >= currentNumberOfDigits: number_of_digits -= currentNumberOfDigits current += 1 current_number_of_digits = len(str(current)) return current - 1 if __name__ == '__...
class PrintHelper: @staticmethod def PrintBanner(printStr, sep='='): bannerStr = sep * len(printStr) print(bannerStr) print(printStr) print(bannerStr)
class Printhelper: @staticmethod def print_banner(printStr, sep='='): banner_str = sep * len(printStr) print(bannerStr) print(printStr) print(bannerStr)
bridgelist = [] with open('input.txt') as infile: for line in infile.readlines(): i, o = line.strip().split('/') i, o = int(i), int(o) bridgelist.append((i,o,)) maxlen = 0 maxstrength = 0 def build_bridge(bridgelist, already_used=None, current_value=0, connector_used=0, current_length=0): ...
bridgelist = [] with open('input.txt') as infile: for line in infile.readlines(): (i, o) = line.strip().split('/') (i, o) = (int(i), int(o)) bridgelist.append((i, o)) maxlen = 0 maxstrength = 0 def build_bridge(bridgelist, already_used=None, current_value=0, connector_used=0, current_length...
class UsernameConverters: regex= '[a-zA-Z0-9]{5,20}' def to_python(self,value): return str(value) def to_url(self,value): return str(value) class MobileConverter: regex = '1[3-9]\d{9}' def to_python(self,value): return str(value) def to_url(self,value): retu...
class Usernameconverters: regex = '[a-zA-Z0-9]{5,20}' def to_python(self, value): return str(value) def to_url(self, value): return str(value) class Mobileconverter: regex = '1[3-9]\\d{9}' def to_python(self, value): return str(value) def to_url(self, value): ...
c, d = None, None def setup(): size(800, 800) global c, d c= color(random(255), random(255), random(255)) d= color(random(255), random(255), random(255)) def draw(): global c, d for x in range(width): # loop through every x p = lerpColor(c, d, 1.0 * x/width) stroke(p) line(x, 0, x, height) ...
(c, d) = (None, None) def setup(): size(800, 800) global c, d c = color(random(255), random(255), random(255)) d = color(random(255), random(255), random(255)) def draw(): global c, d for x in range(width): p = lerp_color(c, d, 1.0 * x / width) stroke(p) line(x, 0, x, h...
n,c = map(int,raw_input().split()) i = 0 while i<c : if [char for char in str(n)][-1] == "0" : n=n/10 else : n-=1 i+=1 print(n)
(n, c) = map(int, raw_input().split()) i = 0 while i < c: if [char for char in str(n)][-1] == '0': n = n / 10 else: n -= 1 i += 1 print(n)
def factorial(n) -> int: if n == 0: return 1 return n * factorial(n - 1) if __name__ == "__main__": print(factorial(0)) print(factorial(1)) print(factorial(2)) print(factorial(3)) print(factorial(4)) print(factorial(5)) print(factorial(9)) print(factorial(20))
def factorial(n) -> int: if n == 0: return 1 return n * factorial(n - 1) if __name__ == '__main__': print(factorial(0)) print(factorial(1)) print(factorial(2)) print(factorial(3)) print(factorial(4)) print(factorial(5)) print(factorial(9)) print(factorial(20))
# CPU: 0.06 s for _ in range(int(input())): tc_no, num = input().split() try: oct_num = int(num, 8) except ValueError: oct_num = 0 # Idk why but you have to convert num to int before printing (or else 'Wrong answer') print(tc_no, oct_num, int(num), int(num, 16))
for _ in range(int(input())): (tc_no, num) = input().split() try: oct_num = int(num, 8) except ValueError: oct_num = 0 print(tc_no, oct_num, int(num), int(num, 16))
# -*- coding: utf-8 -*- # This file is part of the Ingram Micro Cloud Blue Connect connect-cli. # Copyright (c) 2019-2021 Ingram Micro. All Rights Reserved. ITEMS_COLS_HEADERS = { 'A': 'ID', 'B': 'MPN', 'C': 'Action', 'D': 'Name', 'E': 'Description', 'F': 'Type', 'G': 'Precision', 'H':...
items_cols_headers = {'A': 'ID', 'B': 'MPN', 'C': 'Action', 'D': 'Name', 'E': 'Description', 'F': 'Type', 'G': 'Precision', 'H': 'Unit', 'I': 'Billing Period', 'J': 'Commitment', 'K': 'Status', 'L': 'Created', 'M': 'Modified'} params_cols_headers = {'A': 'Verbose ID', 'B': 'ID', 'C': 'Action', 'D': 'Title', 'E': 'Descr...
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None def maxDepth(root: TreeNode) -> int: if not root: return 0 height = 0 queue = [root] while queue: size = len(queue) height += 1 stack = [] while siz...
class Treenode: def __init__(self, x): self.val = x self.left = None self.right = None def max_depth(root: TreeNode) -> int: if not root: return 0 height = 0 queue = [root] while queue: size = len(queue) height += 1 stack = [] while s...
class PublishedEvent(object): def __init__(self, draft, public): self.draft = draft self.public = public
class Publishedevent(object): def __init__(self, draft, public): self.draft = draft self.public = public
# Carson (2111000) | Zenumist Society (261000010) experiment = 3310 closedLab = 926120100 if sm.hasQuest(experiment): control = sm.sendAskYesNo("Do you want to go to the closed laboratory and try controlling the Homun?") if control: sm.sendNext("Concentrate...! It won't be an easy task trying to cont...
experiment = 3310 closed_lab = 926120100 if sm.hasQuest(experiment): control = sm.sendAskYesNo('Do you want to go to the closed laboratory and try controlling the Homun?') if control: sm.sendNext("Concentrate...! It won't be an easy task trying to control the Magic Pentragram that triggers Homun's rage....
t=int(input()) for i in range(0,t): str=input() c=0 for j in range(0,len(str)): ch=str[j] if(ch=='a' or ch=='e' or ch=='i' or ch=='o' or ch=='u' or ch=='A' or ch=='E' or ch=='I' or ch=='O' or ch=='U'): c=c+(len(str)-j)*(j+1) print(c)
t = int(input()) for i in range(0, t): str = input() c = 0 for j in range(0, len(str)): ch = str[j] if ch == 'a' or ch == 'e' or ch == 'i' or (ch == 'o') or (ch == 'u') or (ch == 'A') or (ch == 'E') or (ch == 'I') or (ch == 'O') or (ch == 'U'): c = c + (len(str) - j) * (j + 1) ...
class Solution: def largestUniqueNumber(self, A: List[int]) -> int: counter = Counter(A) for num, freq in sorted(counter.items(), reverse = True): if freq == 1: return num return -1
class Solution: def largest_unique_number(self, A: List[int]) -> int: counter = counter(A) for (num, freq) in sorted(counter.items(), reverse=True): if freq == 1: return num return -1
class Solution: def totalMoney(self, n: int) -> int: # ind = 1 amount = 0 prevmon = 0 while n: coin = prevmon + 1 for i in range(7): amount += coin coin += 1 n-=1 if n==0: r...
class Solution: def total_money(self, n: int) -> int: amount = 0 prevmon = 0 while n: coin = prevmon + 1 for i in range(7): amount += coin coin += 1 n -= 1 if n == 0: return amount ...
# ------------------------------ # # # Description: # # # Version: 1.0 # 01/19/20 by Jianfa # ------------------------------ # Used for testing if __name__ == "__main__": test = Solution() # ------------------------------ # Summary: #
if __name__ == '__main__': test = solution()
#ERROR MESSAGES ARGUMENTS_TYPE_LIST_OR_STRING_ERROR_MESSAGE= "Arguments should be of type List or String" ARGUMENTS_TYPE_STRING_ERROR_MESSAGE = "Arguments should be of type String" LABEL_ALREADY_PRESENT_ERROR_MESSAGE = "Class/Label: {} already present." NO_LABEL_PRESENT_ERROR_MESSAGE = "Please add Class/Labels to the o...
arguments_type_list_or_string_error_message = 'Arguments should be of type List or String' arguments_type_string_error_message = 'Arguments should be of type String' label_already_present_error_message = 'Class/Label: {} already present.' no_label_present_error_message = 'Please add Class/Labels to the object first usi...
class Bacteria: def __init__(self, id, type, age, life_counter, power, x, y): self.id = id self.type = type self.age = age self.life_counter = life_counter self.power = power self.x = x self.y = y # Create 3 instances of Bacteria b1 = Bacteria(1, "Cocci", ...
class Bacteria: def __init__(self, id, type, age, life_counter, power, x, y): self.id = id self.type = type self.age = age self.life_counter = life_counter self.power = power self.x = x self.y = y b1 = bacteria(1, 'Cocci', 4, 100, 8, 23, 35) b2 = bacteria(2, ...
#To add two numbers a=int(input("Enter the 1st number")) b=int(input("Enter the 2nd number")) c=a+b print("The sum of the two numbers:",c)
a = int(input('Enter the 1st number')) b = int(input('Enter the 2nd number')) c = a + b print('The sum of the two numbers:', c)
# configure the dm text def generate_dm_text(name): return '''Hey {}, It great to connect with you on twitter'''.format(name) scheduler_time = 15 #in minutes tw_username = "signosdazueira" #change this to yours
def generate_dm_text(name): return 'Hey {}, It great to connect\n\t\t\twith you on twitter'.format(name) scheduler_time = 15 tw_username = 'signosdazueira'
#!/usr/bin/env python3 def parse(line): bound, char, password = line.split(' ') low, high = bound.split('-') low, high = int(low), int(high) char = char[0] return (low, high, char, password) def is_valid(low, high, char, password): low, high = low - 1, high - 1 low, high = password[low] ...
def parse(line): (bound, char, password) = line.split(' ') (low, high) = bound.split('-') (low, high) = (int(low), int(high)) char = char[0] return (low, high, char, password) def is_valid(low, high, char, password): (low, high) = (low - 1, high - 1) (low, high) = (password[low] == char, pa...
#Python program to clone or copy a list. original_list = [10, 22, 44, 23, 4] new_list = list(original_list) print(original_list) print(new_list)
original_list = [10, 22, 44, 23, 4] new_list = list(original_list) print(original_list) print(new_list)
x = int(input()) if (x > 0): print("positivo") elif (x < 0): print("negativo") else: print("nulo")
x = int(input()) if x > 0: print('positivo') elif x < 0: print('negativo') else: print('nulo')
# test order of closed over locals # not that CPython seems to sort closed over variables (but not fast locals) def f(): l1 = 1 l2 = 4 l3 = 3 l4 = 2 l5 = 5 def g(): return l1 + l4 + l3 + l2 + l5 def h(): return l1 + l2 + l3 + l4 + l5
def f(): l1 = 1 l2 = 4 l3 = 3 l4 = 2 l5 = 5 def g(): return l1 + l4 + l3 + l2 + l5 def h(): return l1 + l2 + l3 + l4 + l5
EAA_EDUCATION_FACILITIES = {'buildings', 'education facilities - schools', 'facilities and infrastructure'} EAA_EDUCATION_STATISTICS = { 'baseline population', 'census', 'demographics', 'development', 'early learning', 'economics', 'educational attainment', 'educators - teachers', 'gap analysis', 'government d...
eaa_education_facilities = {'buildings', 'education facilities - schools', 'facilities and infrastructure'} eaa_education_statistics = {'baseline population', 'census', 'demographics', 'development', 'early learning', 'economics', 'educational attainment', 'educators - teachers', 'gap analysis', 'government data', 'ind...
N = input().split() m = int(N[0]) for i in range(round(m / 2, 0)): for j in range(m): print(N[-1], end='') print()
n = input().split() m = int(N[0]) for i in range(round(m / 2, 0)): for j in range(m): print(N[-1], end='') print()
############################################################################## # Copyright 2022-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. #######################################################...
upload_handles = {} class Fileuploader: def __init__(self, context: str='default'): self.upload_handles = get_upload_handles() if context not in self.upload_handles: raise runtime_error(f'No configuration found for {context}') self.uploader = self.upload_handles[context]() ...
# coding=UTF-8 ## This class define a composite ply class CompositePly: def __init__(self,Material,Thickness,Orientation): ## the material of the ply (either IsoMaterial or OrthoMaterial) self.Material = Material ## the thickness of the ply (m) self.Thickness = Thickness #...
class Compositeply: def __init__(self, Material, Thickness, Orientation): self.Material = Material self.Thickness = Thickness self.Orientation = Orientation def get_material(self): return self.Material def get_thickness(self): return self.Thickness def get_ori...
# Automatically generated file # enum Z3_lbool Z3_L_FALSE = -1 Z3_L_UNDEF = 0 Z3_L_TRUE = 1 # enum Z3_symbol_kind Z3_INT_SYMBOL = 0 Z3_STRING_SYMBOL = 1 # enum Z3_parameter_kind Z3_PARAMETER_INT = 0 Z3_PARAMETER_DOUBLE = 1 Z3_PARAMETER_RATIONAL = 2 Z3_PARAMETER_SYMBOL = 3 Z3_PARAMETER_SORT = 4 Z3_PA...
z3_l_false = -1 z3_l_undef = 0 z3_l_true = 1 z3_int_symbol = 0 z3_string_symbol = 1 z3_parameter_int = 0 z3_parameter_double = 1 z3_parameter_rational = 2 z3_parameter_symbol = 3 z3_parameter_sort = 4 z3_parameter_ast = 5 z3_parameter_func_decl = 6 z3_uninterpreted_sort = 0 z3_bool_sort = 1 z3_int_sort = 2 z3_real_sort...
def f(x): a = [] if x == 0: return f(x) while x > 0: a.append(x) print(x) f(x-1) f(3)
def f(x): a = [] if x == 0: return f(x) while x > 0: a.append(x) print(x) f(x - 1) f(3)
def fimdejogo(ma, ve=0): for l in range(0, 3): for c in range(0, 3): # linhas if ma[l][0] == ma[l][1] and ma[l][1] == ma[l][2]: let = ma[l][2] return let # Colunas if ma[0][c] == ma[1][c] and ma[1][c] == ma[2][c]: ...
def fimdejogo(ma, ve=0): for l in range(0, 3): for c in range(0, 3): if ma[l][0] == ma[l][1] and ma[l][1] == ma[l][2]: let = ma[l][2] return let if ma[0][c] == ma[1][c] and ma[1][c] == ma[2][c]: let = ma[2][c] return let...
class Provider(PhoneNumberProvider): formats = ("%## ####", "%##-####", "%######", "0{{area_code}} %## ####", "0{{area_code}} %##-####", "0{{area_code}}-%##-####", "0{{area_code}} %######", "(0{{area_code}}) %## ####", "(0{{area_code}}) %##-####", "(0{{area_code}}) %######", "+64 {{area_code}} %## ####", "+64 {{area_c...
class Provider(PhoneNumberProvider): formats = ('%## ####', '%##-####', '%######', '0{{area_code}} %## ####', '0{{area_code}} %##-####', '0{{area_code}}-%##-####', '0{{area_code}} %######', '(0{{area_code}}) %## ####', '(0{{area_code}}) %##-####', '(0{{area_code}}) %######', '+64 {{area_code}} %## ####', '+64 {{are...
# No Bugs in Production (NBP) Library # https://github.com/aenachescu/nbplib # # Licensed under the MIT License <http://opensource.org/licenses/MIT>. # SPDX-License-Identifier: MIT # Copyright (c) 2019-2020 Alin Enachescu <https://github.com/aenachescu> # # Permission is hereby granted, free of charge, to any person ob...
tests_config = [{'name': 'check_build_configuration', 'buildConfig': [{'config': '<any>:<any>:<any>:<any>', 'consoleOutputContains': 'linux ${compiler} ${standard} ${platform} ${sanitizer}'}]}, {'name': 'check_leak_sanitizer', 'consoleOutputContains': 'check_leak_sanitizer completed successfully', 'buildConfig': [{'con...
loaddata = LoadData("./unified/uw/train.conll", "./unified/uw/dev.conll", "./unified/uw/test.conll") counter, counter_dev, counter_test = [],[],[] a = loaddata.conllu_counter['train'] a = loaddata.counter_process(a) for d in a: counter.append(d) for d in range(len(counter)): counter[d].index=tuple([d]) b = lo...
loaddata = load_data('./unified/uw/train.conll', './unified/uw/dev.conll', './unified/uw/test.conll') (counter, counter_dev, counter_test) = ([], [], []) a = loaddata.conllu_counter['train'] a = loaddata.counter_process(a) for d in a: counter.append(d) for d in range(len(counter)): counter[d].index = tuple([d])...
# # PySNMP MIB module CISCO-WAN-PAR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-WAN-PAR-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:20:40 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, single_value_constraint, constraints_union, value_size_constraint, constraints_intersection) ...
# https://leetcode.com/problems/single-number/ def singleNumber(nums): count = {} for x in nums: if x not in count: count[x] = 1 else: count[x] = count[x]+1 for x in count: if count[x] ==1: return x print(s...
def single_number(nums): count = {} for x in nums: if x not in count: count[x] = 1 else: count[x] = count[x] + 1 for x in count: if count[x] == 1: return x print(single_number([4, 1, 2, 1, 2]))
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"draw_bg": "01_bbox_canvas.ipynb", "draw_bounding_box": "01_bbox_canvas.ipynb", "get_image_size": "01_bbox_canvas.ipynb", "draw_img": "01_bbox_canvas.ipynb", "points2bbox_c...
__all__ = ['index', 'modules', 'custom_doc_links', 'git_url'] index = {'draw_bg': '01_bbox_canvas.ipynb', 'draw_bounding_box': '01_bbox_canvas.ipynb', 'get_image_size': '01_bbox_canvas.ipynb', 'draw_img': '01_bbox_canvas.ipynb', 'points2bbox_coords': '01_bbox_canvas.ipynb', 'BBoxCanvas': '01_bbox_canvas.ipynb', 'draw_b...
raio = float(input()) pi = 3.14159 area = round(pi * (pow(raio,2)),4) print("A=%.4f" % area)
raio = float(input()) pi = 3.14159 area = round(pi * pow(raio, 2), 4) print('A=%.4f' % area)
#!/usr/bin/env python class CommitMgr(object): def __init__(): pass
class Commitmgr(object): def __init__(): pass
print('Analisando emprestimos!!!') print('=-=' * 20) valor = float(input('Valor do imovel: R$')) salario = float(input('Salario do cliente: R$')) tempo = int(input('Tempo do emprestimo [anos]: ')) print('=-=' * 20) if valor / (12 * tempo) >= salario * 30/100: print(f'Seu emprestimo foi \033[31mNEGADO!') else: p...
print('Analisando emprestimos!!!') print('=-=' * 20) valor = float(input('Valor do imovel: R$')) salario = float(input('Salario do cliente: R$')) tempo = int(input('Tempo do emprestimo [anos]: ')) print('=-=' * 20) if valor / (12 * tempo) >= salario * 30 / 100: print(f'Seu emprestimo foi \x1b[31mNEGADO!') else: ...
#python 3.5.2 ''' This Python functions finds the maximum number in a list by compares each number to every other number on the list. ''' class MyMath(): def __init__(self, list): self.list = list def findMaxNo(self): max = self.list[0] for x in self.list: if x > max...
""" This Python functions finds the maximum number in a list by compares each number to every other number on the list. """ class Mymath: def __init__(self, list): self.list = list def find_max_no(self): max = self.list[0] for x in self.list: if x > max: m...
name, age = "Inshad", 18 username = "MohammedInshad" print ('Hello!') print("inshad: {}\n18 {}\nMohammedInshad: {}".format(name, age, username))
(name, age) = ('Inshad', 18) username = 'MohammedInshad' print('Hello!') print('inshad: {}\n18 {}\nMohammedInshad: {}'.format(name, age, username))
workers = 1 worker_class = 'gevent' bind = '0.0.0.0:5000' pidfile = '/tmp/gunicorn-csdh-api.pid' debug = True reload = True loglevel = 'info' errorlog = '/tmp/gunicorn_csdh_api_error.log' accesslog = '/tmp/gunicorn_csdh_api_access.log' daemon = False
workers = 1 worker_class = 'gevent' bind = '0.0.0.0:5000' pidfile = '/tmp/gunicorn-csdh-api.pid' debug = True reload = True loglevel = 'info' errorlog = '/tmp/gunicorn_csdh_api_error.log' accesslog = '/tmp/gunicorn_csdh_api_access.log' daemon = False
def sol(): a = input() b = input() for i in range(3): print( int(a) * int(b[2 - i]) ) print(int(a) * int(b)) if __name__ == "__main__": sol()
def sol(): a = input() b = input() for i in range(3): print(int(a) * int(b[2 - i])) print(int(a) * int(b)) if __name__ == '__main__': sol()
def main(): x = 10 if(x == 5): x = 1 else: x = 2 x = 3
def main(): x = 10 if x == 5: x = 1 else: x = 2 x = 3
class Phishing(object): @staticmethod def create_(): print("Haciendo phishing")
class Phishing(object): @staticmethod def create_(): print('Haciendo phishing')
n = int(input()) ondo = [list(map(float, input().split())) for _ in range(n)] soukei = {'mousyo': 0, 'manatsu': 1, 'natsu': 2, 'nettai': 3, 'huyu': 4, 'mafuyu': 5} s = [0]*6 for i, j in ondo: if i >= 35: s[soukei['mousyo']] += 1 if 30 <= i < 35: s[soukei['manatsu']] += 1 if 25 <= i...
n = int(input()) ondo = [list(map(float, input().split())) for _ in range(n)] soukei = {'mousyo': 0, 'manatsu': 1, 'natsu': 2, 'nettai': 3, 'huyu': 4, 'mafuyu': 5} s = [0] * 6 for (i, j) in ondo: if i >= 35: s[soukei['mousyo']] += 1 if 30 <= i < 35: s[soukei['manatsu']] += 1 if 25 <= i < 30:...
class Car(object): speed = 0 def __init__(self, vehicle_type=None,model='GM',name='General'): self.vehicle_type= vehicle_type self.model = model self.name=name if self.name in ['Porsche', 'Koenigsegg']: self.num_of_doors = 2 else: self.num_of_doors = 4 if self.vehicle_t...
class Car(object): speed = 0 def __init__(self, vehicle_type=None, model='GM', name='General'): self.vehicle_type = vehicle_type self.model = model self.name = name if self.name in ['Porsche', 'Koenigsegg']: self.num_of_doors = 2 else: self.num_of...
# Python Program To Find Square Of Elements In A List ''' Function Name : Square Of Elements In A List. Function Date : 8 Sep 2020 Function Author : Prasad Dangare Input : Integer Output : Integer ''' def square(x): return x*x # Let Us Take A List Of Numbers lst ...
""" Function Name : Square Of Elements In A List. Function Date : 8 Sep 2020 Function Author : Prasad Dangare Input : Integer Output : Integer """ def square(x): return x * x lst = [1, 2, 3, 4, 5] lst1 = list(map(square, lst)) print(lst1)
n=int(input()) while True: a=int(input()) if a is 0: break if a%n is 0: print("{} is a multiple of {}.".format(a,n)) else: print("{} is NOT a multiple of {}.".format(a,n))
n = int(input()) while True: a = int(input()) if a is 0: break if a % n is 0: print('{} is a multiple of {}.'.format(a, n)) else: print('{} is NOT a multiple of {}.'.format(a, n))
n = int(input()) l = int(input()) for first in range(1, n): for second in range(1, n): for three in range(97, 97 + l): for four in range(97, 97 + l): for five in range(2, n + 1): three_chr = chr(three) four_chr = chr(four) ...
n = int(input()) l = int(input()) for first in range(1, n): for second in range(1, n): for three in range(97, 97 + l): for four in range(97, 97 + l): for five in range(2, n + 1): three_chr = chr(three) four_chr = chr(four) ...