Dataset Viewer
Auto-converted to Parquet Duplicate
question_answer_string
stringlengths
111
33.1k
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do an...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.AtCoDeer the deer found two positive integers, a and b. Determine whether the product of a and b is even or odd. Constraints * 1...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Jiro is a fun loving lad. His classmates are very competitive and are striving for getting a good rank, while he loves seeing them...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.There are N people numbered 1 to N. Each person wears a red hat or a blue hat. You are given a string s representing the colors o...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.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 dif...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given three strings A, B and C. Check whether they form a word chain. More formally, determine whether both of the follow...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.problem AOR Ika is studying to pass the test. AOR Ika-chan solved the $ N $ question. After that, round the solved problem accor...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Addition of Big Integers Given two integers $A$ and $B$, compute the sum, $A + B$. Input Two integers $A$ and $B$ separated by ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.The cat Snuke wants to play a popular Japanese game called ร…tCoder, so Iroha has decided to teach him Japanese. When counting pen...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.There is always an integer in Takahashi's mind. Initially, the integer in Takahashi's mind is 0. Takahashi is now going to eat fo...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Description You are given two strings S and T, such that length of S is greater than the length of T. Then a substring of S is def...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Utkarsh is forced to play yet another one of Ashish's games. The game progresses turn by turn and as usual, Ashish moves first. C...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.An elementary school student Takahashi has come to a variety store. He has two coins, A-yen and B-yen coins (yen is the currency ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.There are N+1 lights. Lights are placed at (0, 0), (1, 0), (2, 0) ... (N, 0). Initially all the lights are on. You want to turn o...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.There are N children standing in a line from left to right. The activeness of the i-th child from the left is A_i. You can rearra...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Given the value of n, print the n'th prime number. Input : A single integer n. Output : A single number which is the n'th prime ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Takahashi wants to print a document with N pages double-sided, where two pages of data can be printed on one sheet of paper. At l...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given N positive integers a_1, a_2, ..., a_N. For a non-negative integer m, let f(m) = (m\ mod\ a_1) + (m\ mod\ a_2) + .....
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Sorting algorithms for sorting data are basic algorithms indispensable in computer science. For example, as shown in the figure be...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.In this problem, you are given two strings S1 and S2, your task is to determine whether one string is an anagram of the other. An ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.In this problem you will meet the simplified model of game King of Thieves. In a new ZeptoLab game called "King of Thieves" your ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given an array of positive integers a1, a2, ..., an ร— T of length n ร— T. We know that for any i > n it is true that ai = a...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.The bustling town of Siruseri has just one sports stadium. There are a number of schools, colleges, sports associations, etc. that...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given string S and T consisting of lowercase English letters. Determine if S equals T after rotation. That is, determine...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You have n coins, each of the same value of 1. Distribute them into packets such that any amount x (1 โ‰ค x โ‰ค n) can be formed usin...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Problem: Rani and Nandu decide to play a number game. Both play alternately, Rani playing the first move. In each of their move...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.We will buy a product for N yen (the currency of Japan) at a shop. If we use only 1000-yen bills to pay the price, how much chang...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Yesterday, Benny decided to buy something from a television shop. She created a list that consisted of small description of N ord...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given a string s consisting of n lowercase Latin letters. Let's denote k-substring of s as a string subsk = sksk + 1..sn ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.There are n cows playing poker at a table. For the current betting phase, each player's status is either "ALLIN", "IN", or "FOLDED...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.A triple of numbers is said to be poor when two of those numbers are equal but the other number is different from those two number...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.We have N integers. The i-th integer is A_i. Find \sum_{i=1}^{N-1}\sum_{j=i+1}^{N} (A_i \mbox{ XOR } A_j), modulo (10^9+7). What...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N? Constraints * 2 \leq N \...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.We have a string X, which has an even number of characters. Half the characters are `S`, and the other half are `T`. Takahashi, w...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Let us call a pair of integer numbers m-perfect, if at least one number in the pair is greater than or equal to m. Thus, the pairs...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Given an array A of N integers, sort them in non-decreasing order. Input Format The first line of the input file contains a posit...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.We have a string s consisting of lowercase English letters. Snuke is partitioning s into some number of non-empty substrings. Let ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Monk's birthday is coming this weekend! He wants to plan a Birthday party and is preparing an invite list with his friend Puchi. ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Smeke has decided to participate in AtCoder Beginner Contest (ABC) if his current rating is less than 1200, and participate in AtC...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Problem Given a natural number N less than or equal to 12, find the smallest natural number such that the number of divisors is e...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Roy wants to change his profile picture on Facebook. Now Facebook has some restriction over the dimension of picture that we can u...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.One hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opin...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Recently, Tokitsukaze found an interesting game. Tokitsukaze had n items at the beginning of this game. However, she thought there...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given a string S consisting of letters `b`, `d`, `p` and `q`. Determine whether S is a mirror string. Here, a mirror stri...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given three integers A, B and C. Determine if there exists an equilateral triangle whose sides have lengths A, B and C. ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Print the K-th element of the following sequence of length 32: 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Anastasia loves going for a walk in Central Uzhlyandian Park. But she became uninterested in simple walking, so she began to colle...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.There are N children, numbered 1, 2, ..., N. Snuke has decided to distribute x sweets among them. He needs to give out all the x ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.There are N mountains ranging from east to west, and an ocean to the west. At the top of each mountain, there is an inn. You have...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You are given a board of size n ร— n, where n is odd (not divisible by 2). Initially, each cell of the board contains one figure. ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Rakesh have learn about vowel in school and is given an assignment by his teacher in which he has to list all vowel together from ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Natasha is going to fly to Mars. She needs to build a rocket, which consists of several stages in some order. Each of the stages i...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.In the previous problem Chandu bought some unsorted arrays and sorted them (in non-increasing order). Now, he has many sorted arra...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation. The te...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Write a program which prints $n$-th fibonacci number for a given integer $n$. The $n$-th fibonacci number is defined by the follow...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.It is known that the area of a regular dodecagon inscribed in a circle of radius a is 3a^2. Given an integer r, find the area of ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.A string is called a k-string if it can be represented as k concatenated copies of some string. For example, the string "aabaabaab...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.An English booklet has been created for publicizing Aizu to the world. When you read it carefully, you found a misnomer (an error ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.You've got an array a, consisting of n integers. The array elements are indexed from 1 to n. Let's determine a two step operation ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Princess Heidi decided to give orders to all her K Rebel ship commanders in person. Unfortunately, she is currently travelling thr...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.problem Given $ N $ different natural numbers $ a_i $. I decided to make a pair by choosing a different natural number from the g...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Shichi-Go-San (literally "Seven-Five-Three") is a traditional event in a certain country to celebrate the growth of seven-, five- ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Eleven wants to choose a new name for herself. As a bunch of geeks, her friends suggested an algorithm to choose a name for her. E...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.In this problem your goal is to guess some secret permutation A of integers from 1 to 16. There are 17 tests in this problem. Tes...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.The average miner Vaganych took refresher courses. As soon as a miner completes the courses, he should take exams. The hardest one...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.There are N cubes stacked vertically on a desk. You are given a string S of length N. The color of the i-th cube from the bottom ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Write a program which finds the greatest common divisor of two natural numbers a and b Hint You can use the following observatio...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Problem description. In Bytelandian University, everyone has to enter his/her name on a computer when entering or leaving the libr...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.In late autumn evening n robots gathered in the cheerful company of friends. Each robot has a unique identifier โ€” an integer from ...
Question: Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Polycarp wants to train before another programming competition. During the first day of his training he should solve exactly 1 pro...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
4