question
large_stringlengths
265
13.2k
Solve the programming task below in a Python markdown code block. You're given a tree with $n$ vertices. Your task is to determine the maximum possible number of edges that can be removed in such a way that all the remaining connected components will have even size. -----Input----- The first line contains an integ...
Solve the programming task below in a Python markdown code block. Tak has N cards. On the i-th (1 \leq i \leq N) card is written an integer x_i. He is selecting one or more cards from these N cards, so that the average of the integers written on the selected cards is exactly A. In how many ways can he make his selecti...
Solve the programming task below in a Python markdown code block. Complete the function/method (depending on the language) to return `true`/`True` when its argument is an array that has the same nesting structures and same corresponding length of nested arrays as the first array. For example: ```python # should retu...
Solve the programming task below in a Python markdown code block. Read problems statements in Mandarin Chinese, Russian and Vietnamese as well. Phantasialand boasts of its famous theme park. The park is frequently visited. It is quite large park that some tourists visit it more than once to fully appreciate its offe...
Solve the programming task below in a Python markdown code block. You are given an array $a$ consisting of $n$ integers. Your task is to say the number of such positive integers $x$ such that $x$ divides each number from the array. In other words, you have to find the number of common divisors of all elements in the ...
Solve the programming task below in a Python markdown code block. Count the number of distinct sequences a_1, a_2, ..., a_{n} (1 ≤ a_{i}) consisting of positive integers such that gcd(a_1, a_2, ..., a_{n}) = x and $\sum_{i = 1}^{n} a_{i} = y$. As this number could be large, print the answer modulo 10^9 + 7. gcd here ...
Solve the programming task below in a Python markdown code block. There is a grid with N rows and N columns of squares. Let (i, j) be the square at the i-th row from the top and the j-th column from the left. Each of the central (N-2) \times (N-2) squares in the grid has a black stone on it. Each of the 2N - 1 squares...
Solve the programming task below in a Python markdown code block. There is an apple tree that bears apples of N colors. The N colors of these apples are numbered 1 to N, and there are a_i apples of Color i. You and Lunlun the dachshund alternately perform the following operation (starting from you): * Choose one or ...
Solve the programming task below in a Python markdown code block. You will be given a contest schedule for D days and M queries of schedule modification. In the i-th query, given integers d_i and q_i, change the type of contest to be held on day d_i to q_i, and then output the final satisfaction at the end of day D on...
Solve the programming task below in a Python markdown code block. These days Arkady works as an air traffic controller at a large airport. He controls a runway which is usually used for landings only. Thus, he has a schedule of planes that are landing in the nearest future, each landing lasts $1$ minute. He was asked...
Solve the programming task below in a Python markdown code block. # Definition **_Disarium number_** is the number that *The sum of its digits powered with their respective positions is equal to the number itself*. ____ # Task **_Given_** a number, **_Find if it is Disarium or not_** . ____ # Warm-up (Highly rec...
Solve the programming task below in a Python markdown code block. Let’s get to know our hero: Agent #134 - Mr. Slayer. He was sent by his CSV agency to Ancient Rome in order to resolve some important national issues. However, something incredible has happened - the enemies have taken Julius Caesar as a prisoner!!! C...
Solve the programming task below in a Python markdown code block. For long time scientists study the behavior of sharks. Sharks, as many other species, alternate short movements in a certain location and long movements between locations. Max is a young biologist. For $n$ days he watched a specific shark, and now he k...
Solve the programming task below in a Python markdown code block. A linear congruential generator produces a series R(⋅) of pseudo-random numbers by the following for- mulas: <image> where S, A, C, and M are all parameters. In this problem, 0 ≤ S, A, C ≤ 15 and M = 256. Now suppose we have some input string I(⋅), w...
Solve the programming task below in a Python markdown code block. Read problems statements in Mandarin Chinese and Russian. Leonid is developing new programming language. The key feature of his language is fast multiplication and raising to a power operations. He is asking you to help with the following task. You h...
Solve the programming task below in a Python markdown code block. Many internet protocols these days include the option of associating a media type with the content being sent. The type is usually inferred from the file extension. You are to write a program that facilitates the lookup of media types for a number of fi...
Solve the programming task below in a Python markdown code block. Our brave travelers reached an island where pirates had buried treasure. However as the ship was about to moor, the captain found out that some rat ate a piece of the treasure map. The treasure map can be represented as a rectangle n × m in size. Each ...
Solve the programming task below in a Python markdown code block. Since the giant heads have appeared in the sky all humanity is in danger, so all Ricks and Mortys from all parallel universes are gathering in groups to find a solution to get rid of them. There are n parallel universes participating in this event (n ...
Solve the programming task below in a Python markdown code block. In this Kata, you will be given a lower case string and your task will be to remove `k` characters from that string using the following rule: ```Python - first remove all letter 'a', followed by letter 'b', then 'c', etc... - remove the leftmost charact...
Solve the programming task below in a Python markdown code block. Every Turkish citizen has an identity number whose validity can be checked by these set of rules: - It is an 11 digit number - First digit can't be zero - Take the sum of 1st, 3rd, 5th, 7th and 9th digit and multiply it by 7. Then subtract the sum of 2...
Solve the programming task below in a Python markdown code block. Makoto has a big blackboard with a positive integer $n$ written on it. He will perform the following action exactly $k$ times: Suppose the number currently written on the blackboard is $v$. He will randomly pick one of the divisors of $v$ (possibly $1$...
Solve the programming task below in a Python markdown code block. YouKn0wWho has two even integers x and y. Help him to find an integer n such that 1 ≤ n ≤ 2 ⋅ 10^{18} and n mod x = y mod n. Here, a mod b denotes the remainder of a after division by b. If there are multiple such integers, output any. It can be shown t...
Solve the programming task below in a Python markdown code block. Life is not easy. Sometimes it is beyond your control. Now, as contestants of ACM ICPC, you might be just tasting the bitter of life. But don't worry! Do not look only on the dark side of life, but look also on the bright side. Life may be an enjoyable ...
Solve the programming task below in a Python markdown code block. Nikolay has only recently started in competitive programming, but already qualified to the finals of one prestigious olympiad. There going to be $n$ participants, one of whom is Nikolay. Like any good olympiad, it consists of two rounds. Tired of the tr...
Solve the programming task below in a Python markdown code block. It's the fourth quater of the Super Bowl and your team is down by 4 points. You're 10 yards away from the endzone, if your team doesn't score a touchdown in the next four plays you lose. On a previous play, you were injured and rushed to the hospital. Y...
Solve the programming task below in a Python markdown code block. Since Grisha behaved well last year, at New Year's Eve he was visited by Ded Moroz who brought an enormous bag of gifts with him! The bag contains n sweet candies from the good ol' bakery, each labeled from 1 to n corresponding to its tastiness. No two ...
Solve the programming task below in a Python markdown code block. You are given an undirected graph consisting of N vertices and M edges. The vertices are numbered 1 to N, and the edges are numbered 1 to M. In addition, each vertex has a label, `A` or `B`. The label of Vertex i is s_i. Edge i bidirectionally connects ...
Solve the programming task below in a Python markdown code block. In this kata, you will make a function that converts between `camelCase`, `snake_case`, and `kebab-case`. You must write a function that changes to a given case. It must be able to handle all three case types: ```python py> change_case("snakeCase", "s...
Solve the programming task below in a Python markdown code block. Create a function that takes a number and finds the factors of it, listing them in **descending** order in an **array**. If the parameter is not an integer or less than 1, return `-1`. In C# return an empty array. For Example: `factors(54)` should ret...
Solve the programming task below in a Python markdown code block. AtCoDeer has three cards, one red, one green and one blue. An integer between 1 and 9 (inclusive) is written on each card: r on the red card, g on the green card and b on the blue card. We will arrange the cards in the order red, green and blue from l...
Solve the programming task below in a Python markdown code block. *This is the advanced version of the [Minimum and Maximum Product of k Elements](https://www.codewars.com/kata/minimum-and-maximum-product-of-k-elements/) kata.* --- Given a list of **integers** and a positive integer `k` (> 0), find the minimum and ...
Solve the programming task below in a Python markdown code block. In some village, there are 999 towers that are 1,(1+2),(1+2+3),...,(1+2+3+...+999) meters high from west to east, at intervals of 1 meter. It had been snowing for a while before it finally stopped. For some two adjacent towers located 1 meter apart, we ...
Solve the programming task below in a Python markdown code block. Two boys decided to compete in text typing on the site "Key races". During the competition, they have to type a text consisting of s characters. The first participant types one character in v_1 milliseconds and has ping t_1 milliseconds. The second part...
Solve the programming task below in a Python markdown code block. In the popular spreadsheets systems (for example, in Excel) the following numeration of columns is used. The first column has number A, the second — number B, etc. till column 26 that is marked by Z. Then there are two-letter numbers: column 27 has numb...
Solve the programming task below in a Python markdown code block. You're given Q queries of the form (L, R). For each query you have to find the number of such x that L ≤ x ≤ R and there exist integer numbers a > 0, p > 1 such that x = a^{p}. -----Input----- The first line contains the number of queries Q (1 ≤ Q ...
Solve the programming task below in a Python markdown code block. Having written another programming contest, three Rabbits decided to grab some lunch. The coach gave the team exactly k time units for the lunch break. The Rabbits have a list of n restaurants to lunch in: the i-th restaurant is characterized by two in...
Solve the programming task below in a Python markdown code block. For a positive integer n, we denote the integer obtained by reversing the decimal notation of n (without leading zeroes) by rev(n). For example, rev(123) = 321 and rev(4000) = 4. You are given a positive integer D. How many positive integers N satisfy ...
Solve the programming task below in a Python markdown code block. You are given two integer arrays a and b of length n. You can reverse at most one subarray (continuous subsegment) of the array a. Your task is to reverse such a subarray that the sum ∑_{i=1}^n a_i ⋅ b_i is maximized. Input The first line contains ...
Solve the programming task below in a Python markdown code block. After the contest in comparing numbers, Shapur's teacher found out that he is a real genius and that no one could possibly do the calculations faster than him even using a super computer! Some days before the contest, the teacher took a very simple-loo...
Solve the programming task below in a Python markdown code block. You are developing frog-shaped robots, and decided to race them against each other. First, you placed N robots onto a number line. These robots are numbered 1 through N. The current coordinate of robot i is x_i. Here, all x_i are integers, and 0 < x_1 ...
Solve the programming task below in a Python markdown code block. Based on the information of the time when study started and the time when study ended, check whether the total time studied in one day is t or more, and if not, create a program to find the shortage time. Time is one unit per hour, and minutes and secon...
Solve the programming task below in a Python markdown code block. Berland has n cities connected by m bidirectional roads. No road connects a city to itself, and each pair of cities is connected by no more than one road. It is not guaranteed that you can get from any city to any other one, using only the existing road...
Solve the programming task below in a Python markdown code block. My friend John likes to go to the cinema. He can choose between system A and system B. ``` System A : he buys a ticket (15 dollars) every time System B : he buys a card (500 dollars) and a first ticket for 0.90 times the ticket price, then for each add...
Solve the programming task below in a Python markdown code block. Three swimmers decided to organize a party in the swimming pool! At noon, they started to swim from the left side of the pool. It takes the first swimmer exactly $a$ minutes to swim across the entire pool and come back, exactly $b$ minutes for the seco...
Solve the programming task below in a Python markdown code block. Simon and Antisimon play a game. Initially each player receives one fixed positive integer that doesn't change throughout the game. Simon receives number a and Antisimon receives number b. They also have a heap of n stones. The players take turns to mak...
Solve the programming task below in a Python markdown code block. There will be a launch of a new, powerful and unusual collider very soon, which located along a straight line. n particles will be launched inside it. All of them are located in a straight line and there can not be two or more particles located in the s...
Solve the programming task below in a Python markdown code block. You are given an array $a$ of $n$ integers, and another integer $k$ such that $2k \le n$. You have to perform exactly $k$ operations with this array. In one operation, you have to choose two elements of the array (let them be $a_i$ and $a_j$; they can ...
Solve the programming task below in a Python markdown code block. Heiankyo is known as a town with a grid of roads. Hokusai, a cat who lives in Heiankyo, has to go from his home to a secret place on the outskirts of town every day for patrol. However, I get tired of following the same path every day, and there is a r...
Solve the programming task below in a Python markdown code block. Do you know "sed," a tool provided with Unix? Its most popular use is to substitute every occurrence of a string contained in the input string (actually each input line) with another string β. More precisely, it proceeds as follows. 1. Within the inpu...
Solve the programming task below in a Python markdown code block. Top-model Izabella participates in the competition. She wants to impress judges and show her mathematical skills. Her problem is following: for given string, consisting of only 0 and 1, tell if it's possible to remove some digits in such a way, that re...
Solve the programming task below in a Python markdown code block. So the Beautiful Regional Contest (BeRC) has come to an end! $n$ students took part in the contest. The final standings are already known: the participant in the $i$-th place solved $p_i$ problems. Since the participants are primarily sorted by the numb...
Solve the programming task below in a Python markdown code block. Qwerty the Ranger took up a government job and arrived on planet Mars. He should stay in the secret lab and conduct some experiments on bacteria that have funny and abnormal properties. The job isn't difficult, but the salary is high. At the beginning ...
Solve the programming task below in a Python markdown code block. Read problems statements in Mandarin Chinese . You are given two strings A and B of the same length. Each string contains N Lower case Latin character (from 'a' to 'z'). A shift operation will remove the first character of a string and add the same ch...
Solve the programming task below in a Python markdown code block. Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is YES or NO. When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those c...
Solve the programming task below in a Python markdown code block. Read problems statements in Mandarin Chinese and Russian. Alok-nath is man of equality. He needs your help to divide his “sanskars” evenly amongst all his followers. By doing this, Alok-nath can create equality amongst his followers and he'll be call...
Solve the programming task below in a Python markdown code block. Codehorses has just hosted the second Codehorses Cup. This year, the same as the previous one, organizers are giving T-shirts for the winners. The valid sizes of T-shirts are either "M" or from $0$ to $3$ "X" followed by "S" or "L". For example, sizes ...
Solve the programming task below in a Python markdown code block. # Description "It's the end of trick-or-treating and we have a list/array representing how much candy each child in our group has made out with. We don't want the kids to start arguing, and using our parental intuition we know trouble is brewing as many...
Solve the programming task below in a Python markdown code block. You are given three integers $a$, $b$ and $x$. Your task is to construct a binary string $s$ of length $n = a + b$ such that there are exactly $a$ zeroes, exactly $b$ ones and exactly $x$ indices $i$ (where $1 \le i < n$) such that $s_i \ne s_{i + 1}$. ...
Solve the programming task below in a Python markdown code block. Everybody knows the classic ["half your age plus seven"](https://en.wikipedia.org/wiki/Age_disparity_in_sexual_relationships#The_.22half-your-age-plus-seven.22_rule) dating rule that a lot of people follow (including myself). It's the 'recommended' age ...
Solve the programming task below in a Python markdown code block. This time the Berland Team Olympiad in Informatics is held in a remote city that can only be reached by one small bus. Bus has n passenger seats, seat i can be occupied only by a participant from the city a_{i}. Today the bus has completed m trips, eac...
Solve the programming task below in a Python markdown code block. E869120 has A 1-yen coins and infinitely many 500-yen coins. Determine if he can pay exactly N yen using only these coins. -----Constraints----- - N is an integer between 1 and 10000 (inclusive). - A is an integer between 0 and 1000 (inclusive). --...
Solve the programming task below in a Python markdown code block. There is a square grid of size $n \times n$. Some cells are colored in black, all others are colored in white. In one operation you can select some rectangle and color all its cells in white. It costs $\min(h, w)$ to color a rectangle of size $h \times ...
Solve the programming task below in a Python markdown code block. Auction square1001 You were watching a certain auction. An auction is a transaction in which when there are a large number of buyers and the number of items is limited, the one with the highest price is given the right to buy. (From the 7th edition of...
Solve the programming task below in a Python markdown code block. Tomya is a girl. She loves Chef Ciel very much. Today, too, Tomya is going to Ciel's restaurant. Of course, Tomya would like to go to Ciel's restaurant as soon as possible. Therefore Tomya uses one of the shortest paths from Tomya's house to Ciel's res...
Solve the programming task below in a Python markdown code block. Devu is a renowned classical singer. He is invited to many big functions/festivals. Recently he was invited to "All World Classical Singing Festival". Other than Devu, comedian Churu was also invited. Devu has provided organizers a list of the songs an...
Solve the programming task below in a Python markdown code block. In the $2022$ year, Mike found two binary integers $a$ and $b$ of length $n$ (both of them are written only by digits $0$ and $1$) that can have leading zeroes. In order not to forget them, he wanted to construct integer $d$ in the following way: he cr...
Solve the programming task below in a Python markdown code block. Consider a simplified penalty phase at the end of a football match. A penalty phase consists of at most $10$ kicks, the first team takes the first kick, the second team takes the second kick, then the first team takes the third kick, and so on. The tea...
Solve the programming task below in a Python markdown code block. Given an array $a$ of length $n$ and an integer $k$, find the number of indices $1 \leq i \leq n - k$ such that the subarray $[a_i, \dots, a_{i+k}]$ with length $k+1$ (not with length $k$) has the following property: If you multiply the first element b...
Solve the programming task below in a Python markdown code block. Takahashi has a string S consisting of lowercase English letters. Starting with this string, he will produce a new one in the procedure given as follows. The procedure consists of Q operations. In Operation i (1 \leq i \leq Q), an integer T_i is provide...
Solve the programming task below in a Python markdown code block. Let's consider a table consisting of n rows and n columns. The cell located at the intersection of i-th row and j-th column contains number i × j. The rows and columns are numbered starting from 1. You are given a positive integer x. Your task is to co...
Solve the programming task below in a Python markdown code block. Vasily has a deck of cards consisting of n cards. There is an integer on each of the cards, this integer is between 1 and 100 000, inclusive. It is possible that some cards have the same integers on them. Vasily decided to sort the cards. To do this, h...
Solve the programming task below in a Python markdown code block. # Do you ever wish you could talk like Siegfried of KAOS ? ## YES, of course you do! https://en.wikipedia.org/wiki/Get_Smart # Task Write the function ```siegfried``` to replace the letters of a given sentence. Apply the rules using the course no...
Solve the programming task below in a Python markdown code block. Recall that MEX of an array is a minimum non-negative integer that does not belong to the array. Examples: for the array $[0, 0, 1, 0, 2]$ MEX equals to $3$ because numbers $0, 1$ and $2$ are presented in the array and $3$ is the minimum non-negative i...
Solve the programming task below in a Python markdown code block. Write a function `titleToNumber(title) or title_to_number(title) or titleToNb title ...` (depending on the language) that given a column title as it appears in an Excel sheet, returns its corresponding column number. All column titles will be upperc...
Solve the programming task below in a Python markdown code block. Friends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is charged at a_1 percent and second one is charged at a_2 percent. You can connect charger to a joystick only at the beginning of each mi...
Solve the programming task below in a Python markdown code block. Recently Polycarpus has learned the "bitwise AND" operation (which is also called "AND") of non-negative integers. Now he wants to demonstrate the school IT teacher his superb manipulation with the learned operation. For that Polycarpus came to school ...
Solve the programming task below in a Python markdown code block. Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string. -----Constraints----- - S and T are strings consisting of lowercase English letters. -...
Solve the programming task below in a Python markdown code block. Yet another Armageddon is coming! This time the culprit is the Julya tribe calendar. The beavers in this tribe knew math very well. Smart Beaver, an archaeologist, got a sacred plate with a magic integer on it. The translation from Old Beaverish is as...
Solve the programming task below in a Python markdown code block. Little girl Alyona is in a shop to buy some copybooks for school. She study four subjects so she wants to have equal number of copybooks for each of the subjects. There are three types of copybook's packs in the shop: it is possible to buy one copybook ...
Solve the programming task below in a Python markdown code block. Given an array containing only integers, add all the elements and return the binary equivalent of that sum. If the array contains any non-integer element (e.g. an object, a float, a string and so on), return false. **Note:** The sum of an empty array ...
Solve the programming task below in a Python markdown code block. Creatnx has $n$ mirrors, numbered from $1$ to $n$. Every day, Creatnx asks exactly one mirror "Am I beautiful?". The $i$-th mirror will tell Creatnx that he is beautiful with probability $\frac{p_i}{100}$ for all $1 \le i \le n$. Creatnx asks the mirro...
Solve the programming task below in a Python markdown code block. Imagine that your city is an infinite 2D plane with Cartesian coordinate system. The only crime-affected road of your city is the x-axis. Currently, there are n criminals along the road. No police station has been built on this road yet, so the mayor wa...
Solve the programming task below in a Python markdown code block. One day, the Grasshopper was jumping on the lawn and found a piece of paper with a string. Grasshopper became interested what is the minimum jump ability he should have in order to be able to reach the far end of the string, jumping only on vowels of th...
Solve the programming task below in a Python markdown code block. Mishka has got n empty boxes. For every i (1 ≤ i ≤ n), i-th box is a cube with side length a_{i}. Mishka can put a box i into another box j if the following conditions are met: i-th box is not put into another box; j-th box doesn't contain any othe...
Solve the programming task below in a Python markdown code block. Snuke has one biscuit and zero Japanese yen (the currency) in his pocket. He will perform the following operations exactly K times in total, in the order he likes: * Hit his pocket, which magically increases the number of biscuits by one. * Exchange A ...
Solve the programming task below in a Python markdown code block. We have a sequence of length N, a = (a_1, a_2, ..., a_N). Each a_i is a positive integer. Snuke's objective is to permute the element in a so that the following condition is satisfied: - For each 1 ≤ i ≤ N - 1, the product of a_i and a_{i + 1} is a mul...
Solve the programming task below in a Python markdown code block. Write a function called that takes a string of parentheses, and determines if the order of the parentheses is valid. The function should return `true` if the string is valid, and `false` if it's invalid. ## Examples ``` "()" => true ")((...
Solve the programming task below in a Python markdown code block. Find the number of integers between 1 and N (inclusive) that contains exactly K non-zero digits when written in base ten. -----Constraints----- - 1 \leq N < 10^{100} - 1 \leq K \leq 3 -----Input----- Input is given from Standard Input in the followi...
Solve the programming task below in a Python markdown code block. π (spelled pi in English) is a mathematical constant representing the circumference of a circle whose di- ameter is one unit length. The name π is said to come from the first letter of the Greek words περιφέρεια (meaning periphery) and περίμετρος (perim...
Solve the programming task below in a Python markdown code block. Jack has become a soldier now. Unfortunately, he has trouble with the drill. Instead of marching beginning with the left foot and then changing legs with each step, as ordered, he keeps repeating a sequence of steps, in which he sometimes makes the wron...
Solve the programming task below in a Python markdown code block. You are playing a game called Guru Guru Gururin. In this game, you can move with the vehicle called Gururin. There are two commands you can give to Gururin: 'R' and 'L'. When 'R' is sent, Gururin rotates clockwise by 90 degrees. Otherwise, when 'L' is s...
Solve the programming task below in a Python markdown code block. You are given $q$ queries in the following form: Given three integers $l_i$, $r_i$ and $d_i$, find minimum positive integer $x_i$ such that it is divisible by $d_i$ and it does not belong to the segment $[l_i, r_i]$. Can you answer all the queries? R...
Solve the programming task below in a Python markdown code block. From 1603 to 1867, people call that era the EDO era. EDO stands for Enhanced Driving Operation, the most advanced space navigation technology at the time, and was developed by Dr. Izy in 1603. You are a space adventurer, flying around the universe and ...
Solve the programming task below in a Python markdown code block. Your friend Cody has to sell a lot of jam, so he applied a good 25% discount to all his merchandise. Trouble is that he mixed all the prices (initial and discounted), so now he needs your cool coding skills to filter out only the discounted prices. Fo...
Solve the programming task below in a Python markdown code block. Capitalization is writing a word with its first letter as a capital letter. Your task is to capitalize the given word. Note, that during capitalization all the letters except the first one remains unchanged. -----Input----- A single line contains a ...
Solve the programming task below in a Python markdown code block. Write a program which reads an integer and prints sum of its digits. Input The input consists of multiple datasets. For each dataset, an integer x is given in a line. The number of digits in x does not exceed 1000. The input ends with a line includ...
Solve the programming task below in a Python markdown code block. There is data on sales of your company. Your task is to write a program which identifies good workers. The program should read a list of data where each item includes the employee ID i, the amount of sales q and the corresponding unit price p. Then, th...
Solve the programming task below in a Python markdown code block. Your task is to calculate logical value of boolean array. Test arrays are one-dimensional and their size is in the range 1-50. Links referring to logical operations: [AND](https://en.wikipedia.org/wiki/Logical_conjunction), [OR](https://en.wikipedia.or...
Solve the programming task below in a Python markdown code block. Scheduling is how the processor decides which jobs(processes) get to use the processor and for how long. This can cause a lot of problems. Like a really long process taking the entire CPU and freezing all the other processes. One solution is Shortest Jo...
Solve the programming task below in a Python markdown code block. Takahashi, who is A years old, is riding a Ferris wheel. It costs B yen (B is an even number) to ride the Ferris wheel if you are 13 years old or older, but children between 6 and 12 years old (inclusive) can ride it for half the cost, and children who ...