messages listlengths 1 1 | ground_truth stringlengths 88 726k | dataset stringclasses 2
values |
|---|---|---|
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are N squares arranged in a row from left to right.\nThe height of the i-th square from the left is H_i.\nYou will land on a square of your choice, then repeat moving to the adjacent square on the right as long as t... | [{"type": "stdin_stdout", "input": "9449\n43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505 43482505... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe only difference between easy and hard versions is the number of elements in the array.\n\nYou are given an array $a$ consisting of $n$ integers. In one move you can choose any $a_i$ and divide it by $2$ rounding down ... | [{"type": "stdin_stdout", "input": "50 25\n199970 199997 199998 199988 199999 199981 200000 199990 199974 199985 199932 200000 199966 199999 199999 199951 199983 199975 199974 199996 199974 199992 199979 199995 199955 199989 199960 199975 199983 199990 199950 199952 199999 199999 199962 199939 199979 199977 199962 1999... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given the array $a$ consisting of $n$ elements and the integer $k \\le n$.\n\nYou want to obtain at least $k$ equal elements in the array $a$. In one move, you can make one of the following two operations:\n\n Ta... | [{"type": "stdin_stdout", "input": "8 6\n893967334 893967335 893967331 893967332 893967333 893967335 893967333 893967333\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "21 6\n12 15 14 4 4 7 2 4 11 1 15 4 12 11 12 8 11 12 3 4 4\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10 4\n1 2 3 5 5 5 5 10 11 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi is practicing shiritori alone again today.\nShiritori is a game as follows:\n - In the first turn, a player announces any one word.\n - In the subsequent turns, a player announces a word that satisfies the follo... | [{"type": "stdin_stdout", "input": "100\nlkykrymhey\nyujwmjhnzx\nxgmkqgsajk\nkkvqjyapln\nnkcubvbxdx\nxheccrzfne\neqeizvicxx\nxesnssfeuz\nzsjdhxndds\nsuvxanfkpe\neodirlsywl\nlmiwshvenl\nluomflsyiq\nqcjuajhxme\nelfadfvxvm\nmknedshbyv\nvnboqueaai\niwexnqgqvj\njzfofokvkg\nggzhwrtktd\nderapdnumy\nyfobbqcozo\noivhkngvyy\nytj... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi is organizing a party.\nAt the party, each guest will receive one or more snack pieces.\nTakahashi predicts that the number of guests at this party will be A or B.\nFind the minimum number of pieces that can be ... | [{"type": "stdin_stdout", "input": "100000 99999\n", "output": "9999900000\n"}, {"type": "stdin_stdout", "input": "90371 92227\n", "output": "8334646217\n"}, {"type": "stdin_stdout", "input": "59054 56588\n", "output": "1670873876\n"}, {"type": "stdin_stdout", "input": "51038 78188\n", "output": "1995279572\n"}, {"type... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven is a string S. Replace every character in S with x and print the result.\n\n-----Constraints-----\n - S is a string consisting of lowercase English letters.\n - The length of S is between 1 and 100 (inclusive).\n\n-... | [{"type": "stdin_stdout", "input": "kvtvweokpottycaeeyfthzfvsgckwjmgqadfekjfitnsieylhumxjjezqvidkxjpywokrnzxxwraamuimhmrjwqeyvjvyjjzsxxf\n", "output": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"}, {"type": "stdin_stdout", "input": "qvssniprlkdntynymqcjoxpttvp... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe will buy a product for N yen (the currency of Japan) at a shop.\nIf we use only 1000-yen bills to pay the price, how much change will we receive?\nAssume we use the minimum number of bills required.\n\n-----Constraints... | [{"type": "stdin_stdout", "input": "1900\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "1001\n", "output": "999\n"}, {"type": "stdin_stdout", "input": "4575\n", "output": "425\n"}, {"type": "stdin_stdout", "input": "6426\n", "output": "574\n"}, {"type": "stdin_stdout", "input": "9445\n", "output": "555\n"},... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nOur world is one-dimensional, and ruled by two empires called Empire A and Empire B.\nThe capital of Empire A is located at coordinate X, and that of Empire B is located at coordinate Y.\nOne day, Empire A becomes incline... | [{"type": "stdin_stdout", "input": "99 99 -22 62\n-9 -54 -13 -39 -79 -88 -6 -14 -41 -29 -2 -69 -30 -20 -33 -8 -24 -80 -19 -87 -32 -60 -40 -59 -44 -52 -3 -67 -18 -51 -56 -12 -7 -31 -48 -27 -68 -78 -21 -11 -49 -93 -1 -64 -82 -66 -70 -58 -84 -26 -57 -37 -53 -89 -50 -34 -61 -46 -92 -95 -99 -63 -65 -28 -10 -16 -73 -55 -98 -... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nEach day in Berland consists of $n$ hours. Polycarp likes time management. That's why he has a fixed schedule for each day — it is a sequence $a_1, a_2, \\dots, a_n$ (each $a_i$ is either $0$ or $1$), where $a_i=0$ if Pol... | [{"type": "stdin_stdout", "input": "23\n1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "21\n1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "7\n1 0 1 1 1 0 1\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nLittle Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he got as a present in Codeforces Round #153 (Div.2). The scientists rejoiced at the ... | [{"type": "stdin_stdout", "input": "13\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "16\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "11\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "15\n", "output": "1\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nNot to be confused with chessboard.\n\n [Image] \n\n\n-----Input-----\n\nThe first line of input contains a single integer N (1 ≤ N ≤ 100) — the number of cheeses you have.\n\nThe next N lines describe the cheeses you hav... | [{"type": "stdin_stdout", "input": "42\nquxukow soft\nwcn soft\npbwg soft\nlrp hard\nphdvfz soft\nidkvymji soft\nobq soft\nyhx soft\nijygw soft\nztzz soft\nuwdhnwu soft\ndgnuuej hard\nhntyyzr soft\nqxf hard\nztg soft\nhnpq soft\nuhznu soft\nitelgl hard\nggceadhw hard\nrxq soft\nkznmshem hard\nlri hard\ndalh soft\ngyzzu... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n[Image] \n\n\n-----Input-----\n\nThe input consists of four lines, each line containing a single digit 0 or 1.\n\n\n-----Output-----\n\nOutput a single digit, 0 or 1.\n\n\n-----Example-----\nInput\n0\n1\n1\n0\n\nOutput\n0... | [{"type": "stdin_stdout", "input": "0\n1\n1\n0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "0\n0\n0\n0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1\n0\n0\n0\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "0\n1\n0\n0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1\n1\n0\n0\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi is meeting up with Aoki.\nThey have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.\nTakahashi will leave his house now and go straight to the place at a speed of S... | [{"type": "stdin_stdout", "input": "7202 7775 4325\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "3982 4784 8417\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "2156 1932 5902\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 10000 10000\n", "output": "Yes\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have a bingo card with a 3\\times3 grid. The square at the i-th row from the top and the j-th column from the left contains the number A_{i, j}.\nThe MC will choose N numbers, b_1, b_2, \\cdots, b_N. If our bingo sheet... | [{"type": "stdin_stdout", "input": "60 88 34\n92 41 43\n65 73 48\n10\n60\n43\n88\n11\n48\n73\n65\n41\n92\n34\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "100 99 20\n18 38 78\n76 60 1\n10\n5\n68\n38\n20\n19\n76\n60\n1\n78\n46\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "53 1 40\n16 75 35\n56 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi has N days of summer vacation.\nHis teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment.\nHe cannot do multiple assignments on the same day, or hang out on a day he doe... | [{"type": "stdin_stdout", "input": "1000000 10000\n10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nToday, the memorable AtCoder Beginner Contest 100 takes place. On this occasion, Takahashi would like to give an integer to Ringo.\n\nAs the name of the contest is AtCoder Beginner Contest 100, Ringo would be happy if he ... | [{"type": "stdin_stdout", "input": "2 100\n", "output": "1010000\n"}, {"type": "stdin_stdout", "input": "2 85\n", "output": "850000\n"}, {"type": "stdin_stdout", "input": "1 100\n", "output": "10100\n"}, {"type": "stdin_stdout", "input": "2 25\n", "output": "250000\n"}, {"type": "stdin_stdout", "input": "2 68\n", "outp... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi is a teacher responsible for a class of N students.\nThe students are given distinct student numbers from 1 to N.\nToday, all the students entered the classroom at different times.\nAccording to Takahashi's reco... | [{"type": "stdin_stdout", "input": "91\n13 42 58 64 76 15 46 37 62 71 25 14 3 61 2 75 44 45 65 74 79 48 41 72 1 10 73 8 63 83 47 36 40 33 87 7 23 38 54 28 60 29 35 57 80 5 11 43 66 50 30 21 12 20 19 51 27 82 69 70 4 68 89 78 17 18 67 26 91 56 9 53 49 32 6 39 84 22 88 59 55 86 24 34 81 85 52 77 31 90 16\n", "output": "2... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nN friends of Takahashi has come to a theme park.\nTo ride the most popular roller coaster in the park, you must be at least K centimeters tall.\nThe i-th friend is h_i centimeters tall.\nHow many of the Takahashi's friend... | [{"type": "stdin_stdout", "input": "81 358\n59 53 2 54 462 325 435 279 464 327 49 332 95 200 220 158 139 492 130 467 489 458 81 100 466 473 429 275 81 270 455 218 128 307 335 398 52 30 311 69 148 384 454 413 114 315 186 334 382 392 326 8 53 462 457 350 231 61 185 88 305 480 64 390 52 247 443 240 93 469 370 16 443 7 25 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have held a popularity poll for N items on sale. Item i received A_i votes.\nFrom these N items, we will select M as popular items. However, we cannot select an item with less than \\dfrac{1}{4M} of the total number of... | [{"type": "stdin_stdout", "input": "100 100\n1000 999 998 997 996 995 994 993 992 991 990 989 988 987 986 985 984 983 982 981 980 979 978 977 976 975 974 973 972 971 970 969 968 967 966 965 964 963 962 961 960 959 958 957 956 955 954 953 952 951 950 949 948 947 946 945 944 943 942 941 940 939 938 937 936 935 934 933 93... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have a grid of H rows and W columns of squares. The color of the square at the i-th row from the top and the j-th column from the left (1 \\leq i \\leq H, 1 \\leq j \\leq W) is given to you as a character c_{i,j}: the ... | [{"type": "stdin_stdout", "input": "6 6 1\n#.....\n.#....\n..#...\n...#..\n....#.\n.....#\n", "output": "1458\n"}, {"type": "stdin_stdout", "input": "6 6 1\n#..#..\n#.....\n......\n......\n......\n.#....\n", "output": "1472\n"}, {"type": "stdin_stdout", "input": "6 6 1\n......\n......\n......\n..#...\n......\n......\n"... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given two non-negative integers L and R.\nWe will choose two integers i and j such that L \\leq i < j \\leq R.\nFind the minimum possible value of (i \\times j) \\mbox{ mod } 2019.\n\n-----Constraints-----\n - All... | [{"type": "stdin_stdout", "input": "1999999216 1999999234\n", "output": "650\n"}, {"type": "stdin_stdout", "input": "1999999264 1999999270\n", "output": "26\n"}, {"type": "stdin_stdout", "input": "1999999266 1999999276\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "1999997173 1999999190\n", "output": "0\n"},... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPolycarp likes numbers that are divisible by 3.\n\nHe has a huge number $s$. Polycarp wants to cut from it the maximum number of numbers that are divisible by $3$. To do this, he makes an arbitrary number of vertical cuts... | [{"type": "stdin_stdout", "input": "1000000000000000000000000000000000\n", "output": "33\n"}, {"type": "stdin_stdout", "input": "14139582796\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "201920181\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "10000170\n", "output": "5\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given two arrays $a$ and $b$, each contains $n$ integers.\n\nYou want to create a new array $c$ as follows: choose some real (i.e. not necessarily integer) number $d$, and then for every $i \\in [1, n]$ let $c_i :... | [{"type": "stdin_stdout", "input": "5\n-999999999 999999999 999999999 999999998 -999999999\n-999999999 -1000000000 -1000000000 -999999999 1000000000\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n999999999 999999998 999999999\n999999998 999999997 999999998\n", "output": "2\n"}, {"type": "stdin_stdout", "in... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are $n$ left boots and $n$ right boots. Each boot has a color which is denoted as a lowercase Latin letter or a question mark ('?'). Thus, you are given two strings $l$ and $r$, both of length $n$. The character $l_... | [{"type": "stdin_stdout", "input": "20\nleduyanhyeunguyenhoa\nminhtriloveviethuong\n", "output": "10\n19 9\n10 14\n4 17\n13 20\n2 11\n1 8\n12 19\n8 4\n18 16\n7 3\n"}, {"type": "stdin_stdout", "input": "10\ncode??????\n??????test\n", "output": "10\n6 2\n1 6\n7 3\n3 5\n4 8\n9 7\n5 1\n2 4\n10 9\n8 10\n"}, {"type": "stdin_... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThis problem is given in two editions, which differ exclusively in the constraints on the number $n$.\n\nYou are given an array of integers $a[1], a[2], \\dots, a[n].$ A block is a sequence of contiguous (consecutive) ele... | [{"type": "stdin_stdout", "input": "100\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given an array $a$, consisting of $n$ positive integers.\n\nLet's call a concatenation of numbers $x$ and $y$ the number that is obtained by writing down numbers $x$ and $y$ one right after another without changin... | [{"type": "stdin_stdout", "input": "100 5\n5087 2232 2630 706 6716 9525 8018 1330 6689 2220 2486 7478 9225 8535 4099 3386 4392 8755 6088 2659 2129 8582 2784 2948 5336 6622 8559 2566 1733 1928 6090 8555 7673 7567 375 7468 1895 1036 4615 185 494 1306 2334 4238 8608 3721 1156 3326 7947 4401 4878 2372 3103 6884 1044 6281 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is an integer sequence A of length N whose values are unknown.\nGiven is an integer sequence B of length N-1 which is known to satisfy the following:\n B_i \\geq \\max(A_i, A_{i+1}) \nFind the maximum possible sum o... | [{"type": "stdin_stdout", "input": "100\n100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given an integer sequence A of length N.\nFind the maximum absolute difference of two elements (with different indices) in A.\n\n-----Constraints-----\n - 2 \\leq N \\leq 100\n - 1 \\leq A_i \\leq 10^9\n - All val... | [{"type": "stdin_stdout", "input": "100\n3142445 16266949 17493698 35569790 80507149 98771888 109205766 111818374 116565925 119183522 141425056 157086378 180302992 187469083 216070266 233105051 257048184 265553444 273526101 281450237 289171706 301768399 311455945 319497119 326729809 338683702 339701654 346802542 353453... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are N towns in a coordinate plane. Town i is located at coordinates (x_i, y_i). The distance between Town i and Town j is \\sqrt{\\left(x_i-x_j\\right)^2+\\left(y_i-y_j\\right)^2}.\nThere are N! possible paths to vi... | [{"type": "stdin_stdout", "input": "8\n898 1000\n85 1000\n980 1000\n359 1000\n-560 1000\n-764 1000\n-103 1000\n-116 1000\n", "output": "5277.7500000000\n"}, {"type": "stdin_stdout", "input": "8\n-1000 1000\n-1000 0\n-1000 -1000\n0 1000\n0 -1000\n1000 1000\n1000 0\n1000 -1000\n", "output": "12300.5630797458\n"}, {"type"... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe window of Takahashi's room has a width of A. There are two curtains hung over the window, each of which has a horizontal length of B. (Vertically, the curtains are long enough to cover the whole window.)\nWe will clos... | [{"type": "stdin_stdout", "input": "100 100\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "75 25\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "68 16\n", "output": "36\n"}, {"type": "stdin_stdout", "input": "20 15\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "20 30\n", "output": "0\n"}, ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given an integer N.\n\nFor two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation o... | [{"type": "stdin_stdout", "input": "10000000000\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "9999999967\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "9876543210\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "6983776800\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "1881548213... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nKatsusando loves omelette rice.\nBesides, he loves crème brûlée, tenderloin steak and so on, and believes that these foods are all loved by everyone.\nTo prove that hypothesis, he conducted a survey on M kinds of foods an... | [{"type": "stdin_stdout", "input": "30 30\n30 18 27 26 17 24 6 29 5 10 4 16 2 30 14 12 3 11 19 1 21 28 20 23 15 25 9 8 7 22 13\n30 2 18 10 9 23 8 13 12 6 3 4 19 15 16 29 22 21 7 25 5 20 17 14 28 24 11 27 30 26 1\n30 18 23 13 19 10 2 12 21 11 28 1 17 26 27 22 29 14 3 15 9 8 5 6 25 30 16 20 7 24 4\n30 16 12 23 7 20 17 25... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven is an integer N.\nTakahashi chooses an integer a from the positive integers not greater than N with equal probability.\nFind the probability that a is odd.\n\n-----Constraints-----\n - 1 \\leq N \\leq 100\n\n-----In... | [{"type": "stdin_stdout", "input": "100\n", "output": "0.5000000000\n"}, {"type": "stdin_stdout", "input": "99\n", "output": "0.5050505051\n"}, {"type": "stdin_stdout", "input": "98\n", "output": "0.5000000000\n"}, {"type": "stdin_stdout", "input": "11\n", "output": "0.5454545455\n"}, {"type": "stdin_stdout", "input": ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are N people numbered 1 to N. Each of them is either an honest person whose testimonies are always correct or an unkind person whose testimonies may be correct or not.\nPerson i gives A_i testimonies. The j-th testi... | [{"type": "stdin_stdout", "input": "15\n14\n2 1\n3 1\n4 1\n5 1\n6 1\n7 1\n8 1\n9 1\n10 1\n11 1\n12 1\n13 1\n14 1\n15 1\n14\n1 1\n3 1\n4 1\n5 1\n6 1\n7 1\n8 1\n9 1\n10 1\n11 1\n12 1\n13 1\n14 1\n15 1\n14\n1 1\n2 1\n4 1\n5 1\n6 1\n7 1\n8 1\n9 1\n10 1\n11 1\n12 1\n13 1\n14 1\n15 1\n14\n1 1\n2 1\n3 1\n5 1\n6 1\n7 1\n8 1\n9... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have a string S consisting of lowercase English letters.\nIf the length of S is at most K, print S without change.\nIf the length of S exceeds K, extract the first K characters in S, append ... to the end of them, and ... | [{"type": "stdin_stdout", "input": "99\nlbyhybgfptdyuqnlszvxoggbjhrjopbevyrzytfhiabtoozntnxxcvmhckjlwxnzniwzzxzvmfiztyirssfeauzncyosgrmsgull\n", "output": "lbyhybgfptdyuqnlszvxoggbjhrjopbevyrzytfhiabtoozntnxxcvmhckjlwxnzniwzzxzvmfiztyirssfeauzncyosgrmsgul...\n"}, {"type": "stdin_stdout", "input": "100\nvefcekrnrodmjprt... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIn the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.\nIn Taknese, the plural form of a noun is spelled based on the following rules:\n - If a noun's singular form does not... | [{"type": "stdin_stdout", "input": "upruskhsmeicaqqesyyvopepmvdosibrvqoghdeikbpqbfgrufxdsqchjkuxpxngebxrmqdgqjsosencrbwknllvucvubyozfmttxtlsrrnrqavshaszrenhlbzpnpjgqftvwgukjwsekfcgllbzlnvmosmvqubtwsgltvmmzmslqdxqiifzkaqhsxzguseuexlycgubhdnwhrssyiybitcoowlhmmrdpgtrdwalvffknwibhwhacqfjcmwupoxonavvxwsvprpymskznabsquwssucx... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nN Snukes called Snuke 1, Snuke 2, ..., Snuke N live in a town.\nThere are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \\cdot... | [{"type": "stdin_stdout", "input": "100 100\n100\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are N slimes lining up from left to right. The colors of these slimes will be given as a string S of length N consisting of lowercase English letters. The i-th slime from the left has the color that corresponds to t... | [{"type": "stdin_stdout", "input": "99798\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nAs AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N, a = {a_1, a_2, a_3, ..., a_N}.\n\nSnuke, an employee, would like to play with this sequence.\nSpecific... | [{"type": "stdin_stdout", "input": "10000\n126382592 432418816 117063168 213396480 379143680 515038208 324231168 266539520 602792960 314653184 650153984 883734016 33309696 9005056 46451200 158759424 33279488 319342080 499438080 853167616 310094336 919876608 882363392 132034048 288561664 745817600 28561408 9703936 79297... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have A cards, each of which has an integer 1 written on it. Similarly, we also have B cards with 0s and C cards with -1s.\nWe will pick up K among these cards. What is the maximum possible sum of the numbers written on... | [{"type": "stdin_stdout", "input": "206383196 349216559 1444400245 1999999999\n", "output": "-1238017048\n"}, {"type": "stdin_stdout", "input": "206383196 349216559 1444400245 2000000000\n", "output": "-1238017049\n"}, {"type": "stdin_stdout", "input": "1000000000 199342280 739321284 1199342280\n", "output": "100000000... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.\nTakahashi says: \"there are X animals in total in the garden, and they have Y legs in total.\" Determine whether there... | [{"type": "stdin_stdout", "input": "25 100\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "50 100\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "25 98\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "51 100\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "32 96\n", "output": "Y... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given an undirected unweighted graph with N vertices and M edges that contains neither self-loops nor double edges.\n\nHere, a self-loop is an edge where a_i = b_i (1≤i≤M), and double edges are two edges where (a_... | [{"type": "stdin_stdout", "input": "8 28\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n3 4\n3 5\n3 6\n3 7\n3 8\n4 5\n4 6\n4 7\n4 8\n5 6\n5 7\n5 8\n6 7\n6 8\n7 8\n", "output": "5040\n"}, {"type": "stdin_stdout", "input": "8 27\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n2 3\n2 4\n2 5\n2 6\n2 7\n3 4\n3 5\n3 6... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nLet us define the FizzBuzz sequence a_1,a_2,... as follows:\n - If both 3 and 5 divides i, a_i=\\mbox{FizzBuzz}.\n - If the above does not hold but 3 divides i, a_i=\\mbox{Fizz}.\n - If none of the above holds but 5 divid... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "266666333332\n"}, {"type": "stdin_stdout", "input": "999997\n", "output": "266665333334\n"}, {"type": "stdin_stdout", "input": "870108\n", "output": "201890463153\n"}, {"type": "stdin_stdout", "input": "445802\n", "output": "52997595603\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven are an integer X and an integer sequence of length N: p_1, \\ldots, p_N.\nAmong the integers not contained in the sequence p_1, \\ldots, p_N (not necessarily positive), find the integer nearest to X, that is, find t... | [{"type": "stdin_stdout", "input": "51 100\n70 94 98 62 63 19 59 50 36 48 97 82 53 5 3 96 51 13 64 79 65 23 75 72 74 87 100 43 81 42 71 34 57 88 60 77 31 12 10 52 29 92 66 1 61 90 21 55 22 30 14 35 41 2 78 37 15 73 69 58 25 67 28 16 99 38 85 33 20 95 32 24 80 40 4 45 11 83 7 17 91 89 54 18 26 56 9 27 68 47 76 93 39 84 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are H rows and W columns of white square cells.\nYou will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.\nHow many white cells will remain?\nIt can be prove... | [{"type": "stdin_stdout", "input": "13 13\n8 10\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "20 20\n19 19\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "19 19\n5 3\n", "output": "224\n"}, {"type": "stdin_stdout", "input": "20 20\n1 1\n", "output": "361\n"}, {"type": "stdin_stdout", "input": "20 2... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a sequence of integers of length $n$ and integer number $k$. You should print any integer number $x$ in the range of $[1; 10^9]$ (i.e. $1 \\le x \\le 10^9$) such that exactly $k$ elements of given sequence a... | [{"type": "stdin_stdout", "input": "4 4\n1000000000 1000000000 1000000000 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "2 2\n1000000000 1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1 1\n1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "inp... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA 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. Th... | [{"type": "stdin_stdout", "input": "100 3\n...\n...\n...\n...\n...\n...\n...\n*..\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n.*.\n***\n.*.\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n...\n..... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nLet's call (yet again) a string good if its length is even, and every character in odd position of this string is different from the next character (the first character is different from the second, the third is different... | [{"type": "stdin_stdout", "input": "100\nabbbbaabbbbababbbabababbbabaabaababaaababbbaaaabbabbbbbbbabbbbbbbbabbbaaababbaaabbabbaabaaabaaabbabb\n", "output": "38\nabbaabbababababababaabababababbaabbabababaababbaabbabaabababba\n"}, {"type": "stdin_stdout", "input": "33\njffufkhhlvdkeagezgwsoikbyqxzqwkvc\n", "output": "1\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a connected undirected graph consisting of $n$ vertices and $m$ edges. There are no self-loops or multiple edges in the given graph.\n\nYou have to direct its edges in such a way that the obtained directed g... | [{"type": "stdin_stdout", "input": "10 10\n9 2\n6 4\n2 10\n7 8\n8 6\n9 3\n2 6\n7 1\n7 4\n5 4\n", "output": "YES\n0010101000\n"}, {"type": "stdin_stdout", "input": "10 10\n6 8\n9 10\n10 1\n2 10\n10 7\n3 1\n8 1\n2 1\n4 1\n5 10\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10 10\n3 4\n3 5\n8 9\n5 1\n7 3\n3 2\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given four integers A, B, C, and D. Find the number of integers between A and B (inclusive) that can be evenly divided by neither C nor D.\n\n-----Constraints-----\n - 1\\leq A\\leq B\\leq 10^{18}\n - 1\\leq C,D\\... | [{"type": "stdin_stdout", "input": "123456789987654321 987654321123456789 999999999 1000000000\n", "output": "864197529407407405\n"}, {"type": "stdin_stdout", "input": "314159265358979323 846264338327950288 419716939 937510582\n", "output": "532105071133627368\n"}, {"type": "stdin_stdout", "input": "827191816666888190 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nAn integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9.\nDetermine whether N is a multiple of 9.\n\n-----Constraints-----\n - 0 \\leq N < 10^{200000}\n -... | [{"type": "stdin_stdout", "input": "33813819154164361588118768953262516554574111032083043031384286303065210509562262038973079975476396016546146039303789823110933080134565927492314604458575884820133400398416950126075966048913496870281342656762187821939147033106717650124502612019109078419691362651717290499399798948652832... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTo make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the following amounts in one operation:\n - 1 yen (the currency of Japan)\n - 6 yen, 6^2(=36) yen, 6^3(=216) yen, ...\n -... | [{"type": "stdin_stdout", "input": "44852\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "43637\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "99788\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "35861\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "100000\n", "output": "7\n"},... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given string S and T consisting of lowercase English letters.\nDetermine if S equals T after rotation.\nThat is, determine if S equals T after the following operation is performed some number of times:\nOperation:... | [{"type": "stdin_stdout", "input": "pgykichjtpukfnlxfcevkjezqsmeycanjlbessrfazdprcomdpjimsfbuslksyveergcgmonctcsvypolplcgsqyfkilrixodiwq\nfnlxfcevkjezqsmeycanjlbessrfazdprcomdpjimsfbuslksyveergcgmonctcsvypolplcgsqyfkilrixodiwqpgykichjtpuk\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "aaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven are two strings S and T.\nLet us change some of the characters in S so that T will be a substring of S.\nAt least how many characters do we need to change?\nHere, a substring is a consecutive subsequence. For exampl... | [{"type": "stdin_stdout", "input": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given positive integers A and B.\nFind the K-th largest positive integer that divides both A and B.\nThe input guarantees that there exists such a number.\n\n-----Constraints-----\n - All values in input are integ... | [{"type": "stdin_stdout", "input": "100 100 1\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 50 4\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "96 96 12\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "60 60 11\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "93 31 1\n", "outp... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi loves gold coins. He gains 1000 happiness points for each 500-yen coin he has and gains 5 happiness points for each 5-yen coin he has. (Yen is the currency of Japan.)\nTakahashi has X yen. If he exchanges his mo... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "2000000000\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "1999999495\n"}, {"type": "stdin_stdout", "input": "999999994\n", "output": "1999999490\n"}, {"type": "stdin_stdout", "input": "999999499\n", "output": "1999998495\n"}, {"type": "stdi... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are N people living on a number line.\nThe i-th person lives at coordinate X_i.\nYou are going to hold a meeting that all N people have to attend.\nThe meeting can be held at any integer coordinate. If you choose to... | [{"type": "stdin_stdout", "input": "100\n1 1 1 100 100 1 100 1 100 100 100 1 100 1 1 1 100 1 100 100 100 1 1 100 100 100 100 100 100 1 1 100 100 100 100 100 1 100 1 1 1 100 100 100 1 100 1 100 100 1 1 1 1 1 1 100 1 1 100 1 1 1 100 100 1 1 100 100 100 100 100 1 100 1 1 100 1 1 1 100 1 100 100 100 1 1 1 100 1 1 100 100 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi's house has only one socket.\nTakahashi wants to extend it with some number of power strips, each with A sockets, into B or more empty sockets.\nOne power strip with A sockets can extend one empty socket into A ... | [{"type": "stdin_stdout", "input": "13 17\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "10 19\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "20 19\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "2 20\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "4 10\n", "output": "3\n"}, {"typ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\n-----Input-----\n\nThe first line contains a single integer n (1 ≤ n ≤ 1000) — the number of points on a plane.\n\nEach of the next n lines contains two real coordinates x_{i} and y_{i} of the $i^{\\text{th}}$ point, spec... | [{"type": "stdin_stdout", "input": "14\n99.19 -882.27\n468.09 310.41\n-539.17 665.55\n-355.65 -90.01\n490.35 -966.88\n-102.77 252.03\n981.63 -976.33\n-363.05 -435.09\n-44.93 -37.28\n947.69 530.68\n49.38 -299.65\n503.33 684.17\n199.13 328.89\n31.24 65.36\n", "output": "-55.744\n"}, {"type": "stdin_stdout", "input": "8\n... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe only difference between easy and hard versions is the constraints.\n\nPolycarp has to write a coursework. The coursework consists of $m$ pages.\n\nPolycarp also has $n$ cups of coffee. The coffee in the $i$-th cup Pol... | [{"type": "stdin_stdout", "input": "100 10000\n93 99 95 105 94 108 104 104 102 112 106 82 114 104 88 107 105 104 93 96 103 109 105 82 107 95 83 93 120 115 96 104 96 86 87 102 103 108 97 84 108 117 109 107 80 87 102 107 88 97 96 101 101 114 106 103 99 101 105 102 85 94 98 101 115 100 91 92 108 105 94 110 91 89 119 119 9... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given an array $s$ consisting of $n$ integers.\n\nYou have to find any array $t$ of length $k$ such that you can cut out maximum number of copies of array $t$ from array $s$.\n\nCutting out the copy of $t$ means t... | [{"type": "stdin_stdout", "input": "36 17\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3\n", "output": "1 1 1 1 1 1 1 1 1 2 2 2 2 3 3 3 3 \n"}, {"type": "stdin_stdout", "input": "30 15\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2\n", "output": "1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 \n"... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a matrix $a$, consisting of $n$ rows and $m$ columns. Each cell contains an integer in it.\n\nYou can change the order of rows arbitrarily (including leaving the initial order), but you can't change the orde... | [{"type": "stdin_stdout", "input": "5 5\n1337 1337 1337 1337 1337\n1337 1337 1337 1337 1337\n1337 1337 1337 1337 1337\n1337 1337 1337 1337 1337\n1337 1337 1337 1337 1337\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 5\n420 420 420 420 420\n420 420 420 420 420\n420 420 420 420 420\n420 420 420 420 420\n420 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou can not just take the file and send it. When Polycarp trying to send a file in the social network \"Codehorses\", he encountered an unexpected problem. If the name of the file contains three or more \"x\" (lowercase L... | [{"type": "stdin_stdout", "input": "100\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n", "output": "98\n"}, {"type": "stdin_stdout", "input": "100\nuxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxxxxmrx\n", "output": ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIt is known that the area of a regular dodecagon inscribed in a circle of radius a is 3a^2.\nGiven an integer r, find the area of a regular dodecagon inscribed in a circle of radius r.\n\n-----Constraints-----\n - 1 \\leq... | [{"type": "stdin_stdout", "input": "100\n", "output": "30000\n"}, {"type": "stdin_stdout", "input": "80\n", "output": "19200\n"}, {"type": "stdin_stdout", "input": "66\n", "output": "13068\n"}, {"type": "stdin_stdout", "input": "93\n", "output": "25947\n"}, {"type": "stdin_stdout", "input": "98\n", "output": "28812\n"}... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are S sheep and W wolves.\nIf the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep.\nIf the wolves will attack the sheep, print unsafe; otherwise, print safe.\n\n-----Cons... | [{"type": "stdin_stdout", "input": "100 100\n", "output": "unsafe\n"}, {"type": "stdin_stdout", "input": "10 10\n", "output": "unsafe\n"}, {"type": "stdin_stdout", "input": "99 99\n", "output": "unsafe\n"}, {"type": "stdin_stdout", "input": "74 74\n", "output": "unsafe\n"}, {"type": "stdin_stdout", "input": "63 64\n", ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere is a right triangle ABC with ∠ABC=90°.\nGiven the lengths of the three sides, |AB|,|BC| and |CA|, find the area of the right triangle ABC.\nIt is guaranteed that the area of the triangle ABC is an integer.\n\n-----C... | [{"type": "stdin_stdout", "input": "28 96 100\n", "output": "1344\n"}, {"type": "stdin_stdout", "input": "35 84 91\n", "output": "1470\n"}, {"type": "stdin_stdout", "input": "77 36 85\n", "output": "1386\n"}, {"type": "stdin_stdout", "input": "45 28 53\n", "output": "630\n"}, {"type": "stdin_stdout", "input": "24 10 26... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi likes the sound when he buys a drink from a vending machine.\nThat sound can be heard by spending A yen (the currency of Japan) each time.\nTakahashi has B yen. He will hear the sound as many times as he can wit... | [{"type": "stdin_stdout", "input": "100 100 100\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 100 100\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "1 100 99\n", "output": "99\n"}, {"type": "stdin_stdout", "input": "100 1 10\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "4 99 23\n", "... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nCompute A \\times B.\n\n-----Constraints-----\n - 1 \\leq A \\leq 100\n - 1 \\leq B \\leq 100\n - All values in input are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nA B\n\n-... | [{"type": "stdin_stdout", "input": "100 100\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "22 75\n", "output": "1650\n"}, {"type": "stdin_stdout", "input": "26 45\n", "output": "1170\n"}, {"type": "stdin_stdout", "input": "72 81\n", "output": "5832\n"}, {"type": "stdin_stdout", "input": "47 29\n", "output... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA biscuit making machine produces B biscuits at the following moments: A seconds, 2A seconds, 3A seconds and each subsequent multiple of A seconds after activation.\nFind the total number of biscuits produced within T + 0... | [{"type": "stdin_stdout", "input": "1 20 20\n", "output": "400\n"}, {"type": "stdin_stdout", "input": "20 20 19\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "7 10 12\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "8 16 20\n", "output": "32\n"}, {"type": "stdin_stdout", "input": "4 13 17\n", "output... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi the Jumbo will practice golf.\nHis objective is to get a carry distance that is a multiple of K, while he can only make a carry distance of between A and B (inclusive).\nIf he can achieve the objective, print OK... | [{"type": "stdin_stdout", "input": "1000\n2 1000\n", "output": "OK\n"}, {"type": "stdin_stdout", "input": "279\n691 872\n", "output": "OK\n"}, {"type": "stdin_stdout", "input": "379\n400 757\n", "output": "NG\n"}, {"type": "stdin_stdout", "input": "1000\n1 999\n", "output": "NG\n"}, {"type": "stdin_stdout", "input": "1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nIn order to pass the entrance examination tomorrow, Taro has to study for T more hours.\nFortunately, he can leap to World B where time passes X times as fast as it does in our world (World A).\nWhile (X \\times t) hours ... | [{"type": "stdin_stdout", "input": "100 1\n", "output": "100.0000000000\n"}, {"type": "stdin_stdout", "input": "100 17\n", "output": "5.8823529412\n"}, {"type": "stdin_stdout", "input": "56 100\n", "output": "0.5600000000\n"}, {"type": "stdin_stdout", "input": "99 1\n", "output": "99.0000000000\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have two bottles for holding water.\nBottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.\nBottle 2 contains C milliliters of water.\nWe will transfer water from Bottle 2 to Bottl... | [{"type": "stdin_stdout", "input": "20 20 20\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "10 1 20\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "16 5 15\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "20 1 19\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "19 5 13\n", "output":... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have two permutations P and Q of size N (that is, P and Q are both rearrangements of (1,~2,~...,~N)).\nThere are N! possible permutations of size N. Among them, let P and Q be the a-th and b-th lexicographically smalle... | [{"type": "stdin_stdout", "input": "8\n7 3 5 4 2 1 6 8\n3 8 2 5 4 6 7 1\n", "output": "17517\n"}, {"type": "stdin_stdout", "input": "8\n5 7 4 2 8 3 6 1\n1 7 8 4 6 2 5 3\n", "output": "19898\n"}, {"type": "stdin_stdout", "input": "8\n1 2 3 4 5 6 7 8\n8 7 6 5 4 3 2 1\n", "output": "40319\n"}, {"type": "stdin_stdout", "in... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a string S consisting of uppercase English letters. Find the length of the longest ACGT string that is a substring (see Notes) of S.\nHere, a ACGT string is a string that contains no characters other than A,... | [{"type": "stdin_stdout", "input": "TTTTTTTTTT\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "BBBBBBBBBB\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "GACGCTCCAV\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "CTTAHTGACT\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "TGMJCTTDAA\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).\n\n-----Constraints-----\n - 1 \\leq N \\leq 10^5\n\n-----Input---... | [{"type": "stdin_stdout", "input": "100000\n", "output": "90909\n"}, {"type": "stdin_stdout", "input": "45901\n", "output": "36811\n"}, {"type": "stdin_stdout", "input": "99924\n", "output": "90834\n"}, {"type": "stdin_stdout", "input": "99999\n", "output": "90909\n"}, {"type": "stdin_stdout", "input": "10000\n", "outp... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven are strings S and T. Consider changing S to T by repeating the operation below. Find the minimum number of operations required to do so.\nOperation: Choose one character of S and replace it with a different characte... | [{"type": "stdin_stdout", "input": "sjpvbzildfxlaukqtfznjjyryrdawsycubdpieejlzsexyhuajiqqigetwdyjeignkuuedzguvqhyrubpdfsenayqahbaqnyhavlaptlqtrotfzvbqbtpkuddnopjzoteuubxgkthzdyepesqgozkdvkcakraxeulhhqtnpolbtcsgxgskjjzdimcyhclnnwfbxwmznpvjaqjqqogwgwmzzpcvhywpcocmsxxmgsodckxvipzobspvwjezxugjlivdhefgdfkzzidktxjcnayjubmsqm... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou will turn on the air conditioner if, and only if, the temperature of the room is 30 degrees Celsius or above.\nThe current temperature of the room is X degrees Celsius. Will you turn on the air conditioner?\n\n-----Co... | [{"type": "stdin_stdout", "input": "30\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "40\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-40\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "-29\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "-30\n", "output": "No\n"}, {"type": ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are N points in a D-dimensional space.\nThe coordinates of the i-th point are (X_{i1}, X_{i2}, ..., X_{iD}).\nThe distance between two points with coordinates (y_1, y_2, ..., y_D) and (z_1, z_2, ..., z_D) is \\sqrt{... | [{"type": "stdin_stdout", "input": "10 10\n8 -14 -14 -20 18 -1 -3 18 -1 10\n-9 2 4 -13 13 5 14 -9 20 -18\n-19 -19 -19 20 -3 20 -2 -18 -7 -11\n5 7 3 -11 12 -9 -10 10 20 -19\n-12 -8 -20 -13 12 13 17 17 -6 0\n-4 -14 -15 -15 18 19 -8 -1 -20 -2\n-7 11 -10 -16 3 -5 -12 15 6 -2\n12 18 -3 -15 -20 17 9 9 10 -10\n10 -2 9 -16 2 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe door of Snuke's laboratory is locked with a security code.\nThe security code is a 4-digit number. We say the security code is hard to enter when it contains two consecutive digits that are the same.\nYou are given th... | [{"type": "stdin_stdout", "input": "8080\n", "output": "Good\n"}, {"type": "stdin_stdout", "input": "0930\n", "output": "Good\n"}, {"type": "stdin_stdout", "input": "8901\n", "output": "Good\n"}, {"type": "stdin_stdout", "input": "3695\n", "output": "Good\n"}, {"type": "stdin_stdout", "input": "4649\n", "output": "Good... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou have a pot and N ingredients. Each ingredient has a real number parameter called value, and the value of the i-th ingredient (1 \\leq i \\leq N) is v_i.\nWhen you put two ingredients in the pot, they will vanish and r... | [{"type": "stdin_stdout", "input": "50\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000\n", "output": "1000\n"}, {"typ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi went to an all-you-can-eat buffet with N kinds of dishes and ate all of them (Dish 1, Dish 2, \\ldots, Dish N) once.\nThe i-th dish (1 \\leq i \\leq N) he ate was Dish A_i.\nWhen he eats Dish i (1 \\leq i \\leq ... | [{"type": "stdin_stdout", "input": "20\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\n", "output": "1950\n"}, {"type": "stdin_stdout", "input": "20\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWe have a string S of length N consisting of uppercase English letters.\nHow many times does ABC occur in S as contiguous subsequences (see Sample Inputs and Outputs)?\n\n-----Constraints-----\n - 3 \\leq N \\leq 50\n - S... | [{"type": "stdin_stdout", "input": "50\nABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCAB\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "50\nBMZBMWEYYDIADTLCOUEGMDBYFWURPWBPUVHIFNUAPWYNDMHTQV\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "50\nKGKBHTYTSZOTWFLEGSJZZSZFWTZFPNSCGUEMWRCZQXYCIVDQNK\n", ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTakahashi is participating in a programming contest, AXC001. He has just submitted his code to Problem A.\n\nThe problem has N test cases, all of which must be passed to get an AC verdict.\n\nTakahashi's submission has pa... | [{"type": "stdin_stdout", "input": "22 22\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "75 75\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "26 26\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "45 45\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "72 72\n", "output": "Yes... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal.\n\nGiven a string S, determine ... | [{"type": "stdin_stdout", "input": "sippuu\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "coffee\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "dceett\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "otjjmm\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "zkrrcc\n", "output":... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nWhen Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.\nYou, the smartwatch, has found N routes to his home.\nIf Mr. X uses the i-th of these ro... | [{"type": "stdin_stdout", "input": "100 79\n359 483\n836 935\n246 178\n901 621\n246 967\n428 447\n65 252\n294 631\n903 95\n965 92\n901 614\n528 580\n420 398\n727 132\n266 536\n991 973\n419 606\n710 676\n418 666\n268 141\n500 874\n685 455\n868 169\n222 348\n748 482\n535 214\n487 952\n52 336\n380 985\n581 209\n516 292\n2... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nN of us are going on a trip, by train or taxi.\nThe train will cost each of us A yen (the currency of Japan).\nThe taxi will cost us a total of B yen.\nHow much is our minimum total travel expense?\n\n-----Constraints----... | [{"type": "stdin_stdout", "input": "20 50 50\n", "output": "50\n"}, {"type": "stdin_stdout", "input": "10 4 41\n", "output": "40\n"}, {"type": "stdin_stdout", "input": "2 13 33\n", "output": "26\n"}, {"type": "stdin_stdout", "input": "18 3 19\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "19 2 38\n", "output... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThe only difference between the easy and the hard versions is the maximum value of $k$.\n\nYou are given an infinite sequence of form \"112123123412345$\\dots$\" which consist of blocks of all consecutive positive integer... | [{"type": "stdin_stdout", "input": "10\n1\n10\n100\n1000\n10000\n100000\n1000000\n10000000\n100000000\n1000000000\n", "output": "1\n4\n1\n4\n9\n2\n6\n2\n6\n8\n"}, {"type": "stdin_stdout", "input": "4\n2132\n506\n999999999\n1000000000\n", "output": "8\n2\n9\n8\n"}, {"type": "stdin_stdout", "input": "5\n1\n3\n20\n38\n56\... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nTreeland consists of $n$ cities and $n-1$ roads. Each road is bidirectional and connects two distinct cities. From any city you can get to any other city by roads. Yes, you are right — the country's topology is an undirec... | [{"type": "stdin_stdout", "input": "10 2\n10 3\n1 2\n1 3\n1 4\n2 5\n2 6\n2 7\n3 8\n3 9\n", "output": "3\n1 1 2 3 2 3 1 3 1 "}, {"type": "stdin_stdout", "input": "6 2\n1 4\n4 3\n3 5\n3 6\n5 2\n", "output": "2\n1 2 1 1 2 "}, {"type": "stdin_stdout", "input": "4 2\n3 1\n1 4\n1 2\n", "output": "1\n1 1 1 "}, {"type": "stdin... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nOh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year...\n\n$n$ friends live in a city which can be represented as a number line. The $i$-th friend lives in a house with... | [{"type": "stdin_stdout", "input": "10\n10 7 10 10 7 10 7 7 10 10\n", "output": "2 6\n"}, {"type": "stdin_stdout", "input": "10\n1 2 3 4 5 6 7 8 9 10\n", "output": "4 10\n"}, {"type": "stdin_stdout", "input": "10\n6 6 6 6 6 6 6 6 6 6\n", "output": "1 3\n"}, {"type": "stdin_stdout", "input": "10\n6 8 9 6 5 9 4 8 8 6\n",... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nThere are $n$ kids, numbered from $1$ to $n$, dancing in a circle around the Christmas tree. Let's enumerate them in a clockwise direction as $p_1$, $p_2$, ..., $p_n$ (all these numbers are from $1$ to $n$ and are distinc... | [{"type": "stdin_stdout", "input": "8\n8 5\n8 1\n6 4\n2 6\n7 3\n2 1\n4 3\n7 5\n", "output": "5 7 3 4 6 2 1 8 \n"}, {"type": "stdin_stdout", "input": "7\n2 3\n6 3\n7 6\n5 1\n1 2\n7 4\n5 4\n", "output": "3 6 7 4 5 1 2 \n"}, {"type": "stdin_stdout", "input": "6\n2 4\n5 3\n1 6\n2 5\n3 6\n4 1\n", "output": "2 5 3 6 1 4 \n"}... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are a coach at your local university. There are $n$ students under your supervision, the programming skill of the $i$-th student is $a_i$.\n\nYou have to create a team for a new programming competition. As you know, t... | [{"type": "stdin_stdout", "input": "100\n1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337 1337... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nVova is playing a computer game. There are in total $n$ turns in the game and Vova really wants to play all of them. The initial charge of his laptop battery (i.e. the charge before the start of the game) is $k$.\n\nDurin... | [{"type": "stdin_stdout", "input": "20\n1000000000 510000100 2 1\n1000000000 500000000 2 1\n1000000000 500000000 2 1\n1000000000 500000000 2 1\n1000000000 500000000 2 1\n1000000000 500000000 2 1\n1000000000 500000000 2 1\n1000000000 500000000 2 1\n1000000000 500000000 2 1\n1000000000 999999995 2 1\n1000000000 999999995... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nPolycarp lives on a coordinate line at the point $x = 0$. He goes to his friend that lives at the point $x = a$. Polycarp can move only from left to right, he can pass one unit of length each second.\n\nNow it's raining, ... | [{"type": "stdin_stdout", "input": "100 50 1\n1 2\n3 4\n5 6\n7 8\n9 10\n11 12\n13 14\n15 16\n17 18\n19 20\n21 22\n23 24\n25 26\n27 28\n29 30\n31 32\n33 34\n35 36\n37 38\n39 40\n41 42\n43 44\n45 46\n47 48\n49 50\n51 52\n53 54\n55 56\n57 58\n59 60\n61 62\n63 64\n65 66\n67 68\n69 70\n71 72\n73 74\n75 76\n77 78\n79 80\n81 ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA triple of numbers is said to be poor when two of those numbers are equal but the other number is different from those two numbers.\nYou will be given three integers A, B, and C. If this triple is poor, print Yes; otherw... | [{"type": "stdin_stdout", "input": "5 7 5\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "3 3 4\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6 1 6\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "8 8 2\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "9 1 1\n", "output": "Yes... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA country decides to build a palace.\nIn this country, the average temperature of a point at an elevation of x meters is T-x \\times 0.006 degrees Celsius.\nThere are N places proposed for the place. The elevation of Plac... | [{"type": "stdin_stdout", "input": "1000\n20 -20\n51765 34765 54644 24887 70030 45034 46376 88410 33772 52941 79750 44783 70874 36236 36651 16147 23251 11281 36605 69084 74679 18310 88655 92253 0 76064 82769 20419 60361 61197 51619 35110 6063 82815 99426 22379 61759 34008 31814 22642 80907 10203 11864 18291 34343 35250... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nYou are given a string S of length N consisting of A, C, G and T. Answer the following Q queries:\n - Query i (1 \\leq i \\leq Q): You will be given integers l_i and r_i (1 \\leq l_i < r_i \\leq N). Consider the substring... | [{"type": "stdin_stdout", "input": "8 3\nACACTACG\n3 7\n2 3\n1 8\n", "output": "2\n0\n3\n"}, {"type": "stdin_stdout", "input": "2 1\nAA\n1 2\n", "output": "0\n"}] | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nA shop sells N kinds of fruits, Fruit 1, \\ldots, N, at prices of p_1, \\ldots, p_N yen per item, respectively. (Yen is the currency of Japan.)\nHere, we will choose K kinds of fruits and buy one of each chosen kind. Find... | [{"type": "stdin_stdout", "input": "1000 1000\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 100... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nX and A are integers between 0 and 9 (inclusive).\nIf X is less than A, print 0; if X is not less than A, print 10.\n\n-----Constraints-----\n - 0 \\leq X, A \\leq 9\n - All values in input are integers.\n\n-----Input----... | [{"type": "stdin_stdout", "input": "7 5\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "6 6\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "0 0\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "9 9\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "1 1\n", "output": "10\n"}, {"type": ... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven any integer x, Aoki can do the operation below.\nOperation: Replace x with the absolute difference of x and K.\nYou are given the initial value of an integer N. Find the minimum possible value taken by N after Aoki ... | [{"type": "stdin_stdout", "input": "999999482938498888 1000000000000000000\n", "output": "517061501112\n"}, {"type": "stdin_stdout", "input": "34439284758432890 4389039281938432\n", "output": "673029497074566\n"}, {"type": "stdin_stdout", "input": "542309233112233445 542309233112233445\n", "output": "0\n"}, {"type": "s... | code_stdio |
[
{
"content": "Solve the following coding problem using the programming language python:\n\nGiven are three integers A_1, A_2, and A_3.\nIf A_1+A_2+A_3 is greater than or equal to 22, print bust; otherwise, print win.\n\n-----Constraints-----\n - 1 \\leq A_i \\leq 13 \\ \\ (i=1,2,3)\n - All values in input are i... | [{"type": "stdin_stdout", "input": "13 13 13\n", "output": "bust\n"}, {"type": "stdin_stdout", "input": "1 10 11\n", "output": "bust\n"}, {"type": "stdin_stdout", "input": "6 13 10\n", "output": "bust\n"}, {"type": "stdin_stdout", "input": "13 7 2\n", "output": "bust\n"}, {"type": "stdin_stdout", "input": "11 6 5\n", "... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.