question
large_stringlengths
265
13.2k
Solve the programming task below in a Python markdown code block. Vasily the bear has a favorite rectangle, it has one vertex at point (0, 0), and the opposite vertex at point (x, y). Of course, the sides of Vasya's favorite rectangle are parallel to the coordinate axes. Vasya also loves triangles, if the triangles ...
Solve the programming task below in a Python markdown code block. Berland, 2016. The exchange rate of currency you all know against the burle has increased so much that to simplify the calculations, its fractional part was neglected and the exchange rate is now assumed to be an integer. Reliable sources have informed...
Solve the programming task below in a Python markdown code block. A popular game in a certain country, Pachimon Creature, has been remade and released in Japan. If you love games, after playing this game many times, you've come to think about how you can clear it the fastest. However, no matter how much you think abou...
Solve the programming task below in a Python markdown code block. Igor is a post-graduate student of chemistry faculty in Berland State University (BerSU). He needs to conduct a complicated experiment to write his thesis, but laboratory of BerSU doesn't contain all the materials required for this experiment. Fortunat...
Solve the programming task below in a Python markdown code block. Hongcow is ruler of the world. As ruler of the world, he wants to make it easier for people to travel by road within their own countries. The world can be modeled as an undirected graph with n nodes and m edges. k of the nodes are home to the governmen...
Solve the programming task below in a Python markdown code block. You already know that Valery's favorite sport is biathlon. Due to your help, he learned to shoot without missing, and his skills are unmatched at the shooting range. But now a smaller task is to be performed, he should learn to complete the path fastest...
Solve the programming task below in a Python markdown code block. Takahashi is taking exams on N subjects. The score on each subject will be an integer between 0 and K (inclusive). He has already taken exams on N-1 subjects and scored A_i points on the i-th subject. His goal is to achieve the average score of M points...
Solve the programming task below in a Python markdown code block. Problem If you bring an empty bottle of $ a $ milk, you can exchange it for a new bottle of $ b $ milk. How many bottles of milk can Mr. Kawabayashi, who initially has a bottle of $ x $ milk, drink? Output the remainder after dividing by $ 1000000007 $...
Solve the programming task below in a Python markdown code block. Rick and Morty are playing their own version of Berzerk (which has nothing in common with the famous Berzerk game). This game needs a huge space, so they play it with a computer. In this game there are n objects numbered from 1 to n arranged in a circl...
Solve the programming task below in a Python markdown code block. The Little Elephant loves playing with arrays. He has array a, consisting of n positive integers, indexed from 1 to n. Let's denote the number with index i as ai. Additionally the Little Elephant has m queries to the array, each query is characterised...
Solve the programming task below in a Python markdown code block. Your job is to write function last_digits(n,d) which return the last `d` digits of an integer `n` as a list. `n` will be from 0 to 10^10 Examples: `last_digits(1,1) --> [1]` `last_digits(1234,2) --> [3,4]` `last_digits(637547,6) --> [6,3,7,5,4...
Solve the programming task below in a Python markdown code block. Artist Shinagawa was asked to exhibit n works. Therefore, I decided to exhibit the six sides of the cube colored with paint as a work. The work uses all six colors, Red, Yellow, Blue, Magenta, Green, and Cyan, and each side is filled with one color. Shi...
Solve the programming task below in a Python markdown code block. Kalila and Dimna are two jackals living in a huge jungle. One day they decided to join a logging factory in order to make money. The manager of logging factory wants them to go to the jungle and cut n trees with heights a_1, a_2, ..., a_{n}. They boug...
Solve the programming task below in a Python markdown code block. #Unflatten a list (Easy) There are several katas like "Flatten a list". These katas are done by so many warriors, that the count of available list to flattin goes down! So you have to build a method, that creates new arrays, that can be flattened! #S...
Solve the programming task below in a Python markdown code block. You are given an equation: Ax2 + Bx + C = 0. Your task is to find the number of distinct roots of the equation and print all of them in ascending order. Input The first line contains three integer numbers A, B and C ( - 105 ≀ A, B, C ≀ 105). Any c...
Solve the programming task below in a Python markdown code block. Implement a class/function, which should parse time expressed as `HH:MM:SS`, or `null/nil/None` otherwise. Any extra characters, or minutes/seconds higher than 59 make the input invalid, and so should return `null/nil/None`. Write your solution by mod...
Solve the programming task below in a Python markdown code block. People in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (= 172), i.e., 1-credit coins, 4-credit coins, 9-credit coins, ..., and 289-credit coins,...
Solve the programming task below in a Python markdown code block. Game "Minesweeper 1D" is played on a line of squares, the line's height is 1 square, the line's width is n squares. Some of the squares contain bombs. If a square doesn't contain a bomb, then it contains a number from 0 to 2 β€” the total number of bombs ...
Solve the programming task below in a Python markdown code block. Trouble came from the overseas lands: a three-headed dragon Gorynych arrived. The dragon settled at point C and began to terrorize the residents of the surrounding villages. A brave hero decided to put an end to the dragon. He moved from point A to fig...
Solve the programming task below in a Python markdown code block. Polycarp is working on a new project called "Polychat". Following modern tendencies in IT, he decided, that this project should contain chat as well. To achieve this goal, Polycarp has spent several hours in front of his laptop and implemented a chat se...
Solve the programming task below in a Python markdown code block. #It's show time! Archers have gathered from all around the world to participate in the Arrow Function Faire. But the faire will only start if there are archers signed and if they all have enough arrows in their quivers - at least 5 is the requirement! A...
Solve the programming task below in a Python markdown code block. Following from the previous kata and taking into account how cool psionic powers are compare to the Vance spell system (really, the idea of slots to dumb down the game sucks, not to mention that D&D became a smash hit among geeks, so...), your task in t...
Solve the programming task below in a Python markdown code block. Polycarpus analyzes a string called abracadabra. This string is constructed using the following algorithm: * On the first step the string consists of a single character "a". * On the k-th step Polycarpus concatenates two copies of the string obta...
Solve the programming task below in a Python markdown code block. For the multiset of positive integers $s=\{s_1,s_2,\dots,s_k\}$, define the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of $s$ as follow: $\gcd(s)$ is the maximum positive integer $x$, such that all integers in $s$ are divisible on $x$...
Solve the programming task below in a Python markdown code block. A sequence of positive integers is called great for a positive integer $x$, if we can split it into pairs in such a way that in each pair the first number multiplied by $x$ is equal to the second number. More formally, a sequence $a$ of size $n$ is grea...
Solve the programming task below in a Python markdown code block. You are given two integers $n$ and $k$. You should create an array of $n$ positive integers $a_1, a_2, \dots, a_n$ such that the sum $(a_1 + a_2 + \dots + a_n)$ is divisible by $k$ and maximum element in $a$ is minimum possible. What is the minimum po...
Solve the programming task below in a Python markdown code block. A substring of some string is called the most frequent, if the number of its occurrences is not less than number of occurrences of any other substring. You are given a set of strings. A string (not necessarily from this set) is called good if all eleme...
Solve the programming task below in a Python markdown code block. Vova had a pretty weird sleeping schedule. There are $h$ hours in a day. Vova will sleep exactly $n$ times. The $i$-th time he will sleep exactly after $a_i$ hours from the time he woke up. You can assume that Vova woke up exactly at the beginning of th...
Solve the programming task below in a Python markdown code block. Let's dive into one of the most interesting areas of magic β€” writing spells. Learning this exciting but challenging science is very troublesome, so now you will not learn the magic words, but only get to know the basic rules of writing spells. Each spe...
Solve the programming task below in a Python markdown code block. Complete the solution so that it takes the object (JavaScript/CoffeeScript) or hash (ruby) passed in and generates a human readable string from its key/value pairs. The format should be "KEY = VALUE". Each key/value pair should be separated by a comma...
Solve the programming task below in a Python markdown code block. For every string, after every occurrence of `'and'` and `'but'`, insert the substring `'apparently'` directly after the occurrence. If input does not contain 'and' or 'but', return the original string. If a blank string, return `''`. If substring `'ap...
Solve the programming task below in a Python markdown code block. Curry making As the ACM-ICPC domestic qualifying is approaching, you who wanted to put more effort into practice decided to participate in a competitive programming camp held at a friend's house. Participants decided to prepare their own meals. On the...
Solve the programming task below in a Python markdown code block. A remote island chain contains n islands, labeled 1 through n. Bidirectional bridges connect the islands to form a simple cycle β€” a bridge connects islands 1 and 2, islands 2 and 3, and so on, and additionally a bridge connects islands n and 1. The cent...
Solve the programming task below in a Python markdown code block. You are given set of n points in 5-dimensional space. The points are labeled from 1 to n. No two points coincide. We will call point a bad if there are different points b and c, not equal to a, from the given set such that angle between vectors $\vec{a...
Solve the programming task below in a Python markdown code block. # Task Dudka has `n` details. He must keep exactly 3 of them. To do this, he performs the following operations until he has only 3 details left: ``` He numbers them. He keeps those with either odd or even numbers and throws the others away.``` Dudk...
Solve the programming task below in a Python markdown code block. Nick is interested in prime numbers. Once he read about Goldbach problem. It states that every even integer greater than 2 can be expressed as the sum of two primes. That got Nick's attention and he decided to invent a problem of his own and call it Nol...
Solve the programming task below in a Python markdown code block. Let's define the sum of two permutations p and q of numbers 0, 1, ..., (n - 1) as permutation <image>, where Perm(x) is the x-th lexicographically permutation of numbers 0, 1, ..., (n - 1) (counting from zero), and Ord(p) is the number of permutation p ...
Solve the programming task below in a Python markdown code block. Vasya came up with his own weather forecasting method. He knows the information about the average air temperature for each of the last n days. Assume that the average air temperature for each day is integral. Vasya believes that if the average temperat...
Solve the programming task below in a Python markdown code block. Little X and Little Z are good friends. They always chat online. But both of them have schedules. Little Z has fixed schedule. He always online at any moment of time between a_1 and b_1, between a_2 and b_2, ..., between a_{p} and b_{p} (all borders in...
Solve the programming task below in a Python markdown code block. You are given three strings $s$, $t$ and $p$ consisting of lowercase Latin letters. You may perform any number (possibly, zero) operations on these strings. During each operation you choose any character from $p$, erase it from $p$ and insert it into s...
Solve the programming task below in a Python markdown code block. Alice got a new doll these days. It can even walk! Alice has built a maze for the doll and wants to test it. The maze is a grid with n rows and m columns. There are k obstacles, the i-th of them is on the cell (x_i, y_i), which means the cell in the in...
Solve the programming task below in a Python markdown code block. Vova plans to go to the conference by train. Initially, the train is at the point $1$ and the destination point of the path is the point $L$. The speed of the train is $1$ length unit per minute (i.e. at the first minute the train is at the point $1$, a...
Solve the programming task below in a Python markdown code block. Iahub got lost in a very big desert. The desert can be represented as a n Γ— n square matrix, where each cell is a zone of the desert. The cell (i, j) represents the cell at row i and column j (1 ≀ i, j ≀ n). Iahub can go from one cell (i, j) only down o...
Solve the programming task below in a Python markdown code block. Write a program to determine if two numbers are coprime. A pair of numbers are coprime if their greatest shared factor is 1. For example: ``` 20 and 27 Factors of 20: 1, 2, 4, 5, 10, 20 Factors of 27: 1, 3, 9, 27 Greatest shared factor: 1 20 and 27 are ...
Solve the programming task below in a Python markdown code block. **This Kata is intended as a small challenge for my students** All Star Code Challenge #19 You work for an ad agency and your boss, Bob, loves a catchy slogan. He's always jumbling together "buzz" words until he gets one he likes. You're looking to im...
Solve the programming task below in a Python markdown code block. Three poles stand evenly spaced along a line. Their heights are a, b and c meters, from left to right. We will call the arrangement of the poles beautiful if the tops of the poles lie on the same line, that is, b-a = c-b. Determine whether the arrangeme...
Solve the programming task below in a Python markdown code block. # Task Let's call `product(x)` the product of x's digits. Given an array of integers a, calculate `product(x)` for each x in a, and return the number of distinct results you get. # Example For `a = [2, 8, 121, 42, 222, 23]`, the output should be `3`...
Solve the programming task below in a Python markdown code block. Given a lowercase string that has alphabetic characters only and no spaces, return the highest value of consonant substrings. Consonants are any letters of the alphabet except `"aeiou"`. We shall assign the following values: `a = 1, b = 2, c = 3, .......
Solve the programming task below in a Python markdown code block. You are given two integers $x$ and $y$. You can perform two types of operations: Pay $a$ dollars and increase or decrease any of these integers by $1$. For example, if $x = 0$ and $y = 7$ there are four possible outcomes after this operation: $x = 0...
Solve the programming task below in a Python markdown code block. Vasya came up with a password to register for EatForces β€” a string s. The password in EatForces should be a string, consisting of lowercase and uppercase Latin letters and digits. But since EatForces takes care of the security of its users, user passwo...
Solve the programming task below in a Python markdown code block. We start with a string $s$ consisting only of the digits $1$, $2$, or $3$. The length of $s$ is denoted by $|s|$. For each $i$ from $1$ to $|s|$, the $i$-th character of $s$ is denoted by $s_i$. There is one cursor. The cursor's location $\ell$ is den...
Solve the programming task below in a Python markdown code block. Write a regex to validate a 24 hours time string. See examples to figure out what you should check for: Accepted: 01:00 - 1:00 Not accepted: 24:00 You should check for correct length and no spaces. Write your solution by modifying this code: ```...
Solve the programming task below in a Python markdown code block. You are given 2 numbers is `n` and `k`. You need to find the number of integers between 1 and n (inclusive) that contains exactly `k` non-zero digit. Example1 ` almost_everywhere_zero(100, 1) return 19` by following condition we have 19 numbers that...
Solve the programming task below in a Python markdown code block. Let's write all the positive integer numbers one after another from $1$ without any delimiters (i.e. as a single string). It will be the infinite sequence starting with 123456789101112131415161718192021222324252627282930313233343536... Your task is to ...
Solve the programming task below in a Python markdown code block. So you've found a meeting room - phew! You arrive there ready to present, and find that someone has taken one or more of the chairs!! You need to find some quick.... check all the other meeting rooms to see if all of the chairs are in use. Your meeting...
Solve the programming task below in a Python markdown code block. Harry Potter is on a mission to destroy You-Know-Who's Horcruxes. The first Horcrux that he encountered in the Chamber of Secrets is Tom Riddle's diary. The diary was with Ginny and it forced her to open the Chamber of Secrets. Harry wants to know the d...
Solve the programming task below in a Python markdown code block. Step up and down Kazuki, commonly known as Kerr, who attends JAG University, was invited by your friend this summer to participate in the ICPC (International Collegiate Potchari Contest). ICPC is a sports contest and requires a high degree of athletic ...
Solve the programming task below in a Python markdown code block. Professor Tsukuba invented a mysterious jewelry box that can be opened with a special gold key whose shape is very strange. It is composed of gold bars joined at their ends. Each gold bar has the same length and is placed parallel to one of the three or...
Solve the programming task below in a Python markdown code block. A star is a figure of the following type: an asterisk character '*' in the center of the figure and four rays (to the left, right, top, bottom) of the same positive length. The size of a star is the length of its rays. The size of a star must be a posit...
Solve the programming task below in a Python markdown code block. You are given a permutation of length $n$. Recall that the permutation is an array consisting of $n$ distinct integers from $1$ to $n$ in arbitrary order. For example, $[2, 3, 1, 5, 4]$ is a permutation, but $[1, 2, 2]$ is not a permutation ($2$ appears...
Solve the programming task below in a Python markdown code block. There are N men and N women, both numbered 1, 2, \ldots, N. For each i, j (1 \leq i, j \leq N), the compatibility of Man i and Woman j is given as an integer a_{i, j}. If a_{i, j} = 1, Man i and Woman j are compatible; if a_{i, j} = 0, they are not. T...
Solve the programming task below in a Python markdown code block. Takahashi is a member of a programming competition site, ButCoder. Each member of ButCoder is assigned two values: Inner Rating and Displayed Rating. The Displayed Rating of a member is equal to their Inner Rating if the member has participated in 10 or...
Solve the programming task below in a Python markdown code block. Problem GPA is an abbreviation for "Galaxy Point of Aizu" and takes real numbers from 0 to 4. GPA rock-paper-scissors is a game played by two people. After each player gives a signal of "rock-paper-scissors, pon (hoi)" to each other's favorite move, go...
Solve the programming task below in a Python markdown code block. We have an integer sequence A of length N, where A_1 = X, A_{i+1} = A_i + D (1 \leq i < N ) holds. Takahashi will take some (possibly all or none) of the elements in this sequence, and Aoki will take all of the others. Let S and T be the sum of the num...
Solve the programming task below in a Python markdown code block. The only difference between the easy and hard versions is that the given string $s$ in the easy version is initially a palindrome, this condition is not always true for the hard version. A palindrome is a string that reads the same left to right and ri...
Solve the programming task below in a Python markdown code block. > If you've finished this kata, you can try the [more difficult version](https://www.codewars.com/kata/5b256145a454c8a6990000b5). ## Taking a walk A promenade is a way of uniquely representing a fraction by a succession of β€œleft or right” choices. F...
Solve the programming task below in a Python markdown code block. In this exercise, you will have to create a function named tiyFizzBuzz. This function will take on a string parameter and will return that string with some characters replaced, depending on the value: - If a letter is a upper case consonants, replace t...
Solve the programming task below in a Python markdown code block. You are given a string $s=s_1s_2\dots s_n$ of length $n$, which only contains digits $1$, $2$, ..., $9$. A substring $s[l \dots r]$ of $s$ is a string $s_l s_{l + 1} s_{l + 2} \ldots s_r$. A substring $s[l \dots r]$ of $s$ is called even if the number ...
Solve the programming task below in a Python markdown code block. Chef Jessie has a lot of recipes with her (N). She often remembered the starting few characters of the recipe and forgot the rest. As all the great chefs do, Jessie also numbered the recipes depending on the priority. So, given the list of recipes along...
Solve the programming task below in a Python markdown code block. # Hey You ! Sort these integers for me ... By name ... Do it now ! --- ## Input * Range is ```0```-```999``` * There may be duplicates * The array may be empty ## Example * Input: 1, 2, 3, 4 * Equivalent names: "one", "two", "three", "four" *...
Solve the programming task below in a Python markdown code block. Allen has a LOT of money. He has $n$ dollars in the bank. For security reasons, he wants to withdraw it in cash (we will not disclose the reasons here). The denominations for dollar bills are $1$, $5$, $10$, $20$, $100$. What is the minimum number of bi...
Solve the programming task below in a Python markdown code block. Petya studies in a school and he adores Maths. His class has been studying arithmetic expressions. On the last class the teacher wrote three positive integers a, b, c on the blackboard. The task was to insert signs of operations '+' and '*', and probabl...
Solve the programming task below in a Python markdown code block. Complete the solution so that it returns the number of times the search_text is found within the full_text. Usage example: Write your solution by modifying this code: ```python def solution(full_text, search_text): ``` Your solution should implem...
Solve the programming task below in a Python markdown code block. Manao works on a sports TV. He's spent much time watching the football games of some country. After a while he began to notice different patterns. For example, each team has two sets of uniforms: home uniform and guest uniform. When a team plays a game ...
Solve the programming task below in a Python markdown code block. Cirno has a DAG (Directed Acyclic Graph) with $n$ nodes and $m$ edges. The graph has exactly one node that has no out edges. The $i$-th node has an integer $a_i$ on it. Every second the following happens: Let $S$ be the set of nodes $x$ that have $a_x...
Solve the programming task below in a Python markdown code block. AquaMoon has n friends. They stand in a row from left to right, and the i-th friend from the left wears a T-shirt with a number a_i written on it. Each friend has a direction (left or right). In the beginning, the direction of each friend is right. Aqu...
Solve the programming task below in a Python markdown code block. Here you have to do some mathematical operations on a "dirty string". This kata checks some basics, it's not too difficult. __So what to do?__ Input: String which consists of two positive numbers (doubles) and exactly one operator like `+, -, * or /`...
Solve the programming task below in a Python markdown code block. problem You are in charge of quality control at a machine manufacturing plant. This machine requires a power supply, a motor, and a cable as parts. The manufacturing plant has a power supply, b motors, and c cables, numbered from 1 to a, a + 1 to a + b...
Solve the programming task below in a Python markdown code block. n people are standing on a coordinate axis in points with positive integer coordinates strictly less than 10^6. For each person we know in which direction (left or right) he is facing, and his maximum speed. You can put a bomb in some point with non-ne...
Solve the programming task below in a Python markdown code block. Read problems statements in Mandarin and Russian. Translations in Vietnamese to be uploaded soon. You have a matrix of size N * N with rows numbered through 1 to N from top to bottom and columns through 1 to N from left to right. It contains all value...
Solve the programming task below in a Python markdown code block. This is the easy version of the problem. The difference is the constraints on $n$, $m$ and $t$. You can make hacks only if all versions of the problem are solved. Alice and Bob are given the numbers $n$, $m$ and $k$, and play a game as follows: The ga...
Solve the programming task below in a Python markdown code block. Given is a string S consisting of digits from 1 through 9. Find the number of pairs of integers (i,j) (1 ≀ i ≀ j ≀ |S|) that satisfy the following condition: Condition: In base ten, the i-th through j-th characters of S form an integer that is a multipl...
Solve the programming task below in a Python markdown code block. Ashish has two strings $a$ and $b$, each of length $n$, and an integer $k$. The strings only contain lowercase English letters. He wants to convert string $a$ into string $b$ by performing some (possibly zero) operations on $a$. In one move, he can ei...
Solve the programming task below in a Python markdown code block. problem Soccer is popular in JOI, and a league match called the JOI League is held every week. There are N teams in the JOI league, numbered from 1 to N. All combinations of matches are played exactly once. In other words, N Γ— (N -1) / 2 games are pla...
Solve the programming task below in a Python markdown code block. Sergey Semyonovich is a mayor of a county city N and he used to spend his days and nights in thoughts of further improvements of Nkers' lives. Unfortunately for him, anything and everything has been done already, and there are no more possible improveme...
Solve the programming task below in a Python markdown code block. The Cereal Guy's friend Serial Guy likes to watch soap operas. An episode is about to start, and he hasn't washed his plate yet. But he decided to at least put in under the tap to be filled with water. The plate can be represented by a parallelepiped k ...
Solve the programming task below in a Python markdown code block. Given an array $a$, consisting of $n$ integers, find: $$\max\limits_{1 \le i < j \le n} LCM(a_i,a_j),$$ where $LCM(x, y)$ is the smallest positive integer that is divisible by both $x$ and $y$. For example, $LCM(6, 8) = 24$, $LCM(4, 12) = 12$, $LCM(2,...
Solve the programming task below in a Python markdown code block. You are given a multiset $S$ initially consisting of $n$ distinct non-negative integers. A multiset is a set, that can contain some elements multiple times. You will perform the following operation $k$ times: Add the element $\lceil\frac{a+b}{2}\rceil...
Solve the programming task below in a Python markdown code block. There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend o...
Solve the programming task below in a Python markdown code block. You've purchased a ready-meal from the supermarket. The packaging says that you should microwave it for 4 minutes and 20 seconds, based on a 600W microwave. Oh no, your microwave is 800W! How long should you cook this for?! ___ # Input You'll be gi...
Solve the programming task below in a Python markdown code block. The main street of Berland is a straight line with n houses built along it (n is an even number). The houses are located at both sides of the street. The houses with odd numbers are at one side of the street and are numbered from 1 to n - 1 in the order...
Solve the programming task below in a Python markdown code block. A permutation of length n is an array containing each integer from 1 to n exactly once. For example, q = [4, 5, 1, 2, 3] is a permutation. For the permutation q the square of permutation is the permutation p that p[i] = q[q[i]] for each i = 1... n. For ...
Solve the programming task below in a Python markdown code block. Anya has bought a new smartphone that uses Berdroid operating system. The smartphone menu has exactly n applications, each application has its own icon. The icons are located on different screens, one screen contains k icons. The icons from the first to...
Solve the programming task below in a Python markdown code block. Example Input 4 3 1000 1 2000 2 3000 3 Output 2 3 4 4 Read the inputs from stdin solve the problem and write the answer to stdout (do not directly test on the sample inputs). Enclose your code within ```python delimiters.
Solve the programming task below in a Python markdown code block. There is a data which provides heights (in meter) of mountains. The data is only for ten mountains. Write a program which prints heights of the top three mountains in descending order. Constraints 0 ≀ height of mountain (integer) ≀ 10,000 Input He...
Solve the programming task below in a Python markdown code block. Remove the parentheses = In this kata you are given a string for example: ```python "example(unwanted thing)example" ``` Your task is to remove everything inside the parentheses as well as the parentheses themselves. The example above would return: ...
Solve the programming task below in a Python markdown code block. Given a string s, write a method (function) that will return true if its a valid single integer or floating number or false if its not. Valid examples, should return true: should return false: Write your solution by modifying this code: ```python de...
Solve the programming task below in a Python markdown code block. ATMs of a well-known bank of a small country are arranged so that they can not give any amount of money requested by the user. Due to the limited size of the bill dispenser (the device that is directly giving money from an ATM) and some peculiarities of...
Solve the programming task below in a Python markdown code block. The aim of this Kata is to write a function which will reverse the case of all consecutive duplicate letters in a string. That is, any letters that occur one after the other and are identical. If the duplicate letters are lowercase then they must be s...
Solve the programming task below in a Python markdown code block. Write a simple parser that will parse and run Deadfish. Deadfish has 4 commands, each 1 character long: * `i` increments the value (initially `0`) * `d` decrements the value * `s` squares the value * `o` outputs the value into the return array Inval...