messages listlengths 1 1 | ground_truth stringlengths 156 726k | dataset stringclasses 2
values |
|---|---|---|
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSanta puts all the presents into the huge sack. In order to let his reindeers rest a bit, he only takes as ma... | [{"input": "120", "output": "[6]", "fn_name": "reindeer"}, {"input": "121", "output": "[7]", "fn_name": "reindeer"}, {"input": "150", "output": "[7]", "fn_name": "reindeer"}, {"input": "151", "output": "[8]", "fn_name": "reindeer"}, {"input": "180", "output": "[8]", "fn_name": "reindeer"}, {"input": "30", "output": "[3... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWe have N points in the two-dimensional plane. The coordinates of the i-th point are (X_i,Y_i).\n\nAmong them... | [{"input": "20 101000\n14309 -32939\n-56855 100340\n151364 25430\n103789 -113141\n147404 -136977\n-37006 -30929\n191679 -49557\n13419 70401\n-88280 165170\n-196399 137941\n-176527 -61904\n46659 115261\n-178807 114185\n98784 -6820\n94111 -86268\n-30401 61477\n-55056 7872\n10994 -163796\n138819 -185986\n-69848 -96669", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a set of n elements indexed from 1 to n. The weight of i-th element is w_{i}. The weight of som... | [{"input": "6 2\n2578 6301 8624 6020 8513 9486\n", "output": "4401332\n"}, {"input": "6 3\n4759 5555 7401 8003 2501 6345\n", "output": "7431260\n"}, {"input": "6 2\n2578 6301 8624 6020 8513 9486\n", "output": "4401332\n"}, {"input": "6 3\n4759 5555 7401 8003 2501 6345\n", "output": "7431260\n"}, {"input": "6 2\n2578 63... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are two bus stops denoted A and B, and there n buses that go from A to B every day. The shortest path f... | [{"input": "2 1000000000\n999999999 1000000000\n1 2\n", "output": "Yes\n1999999999 2000000000\n"}, {"input": "2 1000000000\n1 1000000000\n2 2\n", "output": "Yes\n2000000000 2000000001\n"}, {"input": "2 1000010000\n1 1000000000\n2 2\n", "output": "Yes\n2000010000 2000010001\n"}, {"input": "2 1000000000\n130296385 100000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRng is preparing a problem set for a qualification round of CODEFESTIVAL.\n\nHe has N candidates of problems.... | [{"input": "7\n100 200 500 700 238 1600 2000\n6\n100 200 500 700 1600 1600", "output": "NO\n"}, {"input": "7\n100 200 500 700 238 1600 2000\n6\n100 200 500 337 1600 1600", "output": "NO\n"}, {"input": "7\n100 200 500 700 1200 1600 2000\n6\n100 200 500 700 1600 1600", "output": "NO"}, {"input": "7\n100 200 500 700 238 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMisha and Vasya participated in a Codeforces contest. Unfortunately, each of them solved only one problem, th... | [{"input": "1500 1000 176 177\n", "output": "Misha\n"}, {"input": "2750 1750 134 147\n", "output": "Misha\n"}, {"input": "3250 1000 160 138\n", "output": "Misha\n"}, {"input": "1250 2000 101 180\n", "output": "Misha\n"}, {"input": "2250 2250 163 145\n", "output": "Vasya\n"}, {"input": "1750 1250 179 180\n", "output": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nManao has a monitor. The screen of the monitor has horizontal to vertical length ratio a:b. Now he is going t... | [{"input": "999 1000 1365 999\n", "output": "122333/455000\n"}, {"input": "999 1010 1365 999\n", "output": "126883/459550\n"}, {"input": "999 1000 1000 999\n", "output": "1999/1000000\n"}, {"input": "999 1000 1000 999\n", "output": "1999/1000000\n"}, {"input": "999 1000 1206 999\n", "output": "23111/134000\n"}, {"input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe objective is to return all pairs of integers from a given array of integers that have a difference of 2.\... | [{"input": "[1, 3, 5, 6, 8, 10, 15, 32, 12, 14, 56]", "output": "[[[1, 3], [3, 5], [6, 8], [8, 10], [10, 12], [12, 14]]]", "fn_name": "twos_difference"}, {"input": "[6, 3, 4, 1, 5]", "output": "[[[1, 3], [3, 5], [4, 6]]]", "fn_name": "twos_difference"}, {"input": "[1, 2, 3, 4]", "output": "[[[1, 3], [2, 4]]]", "fn_name... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe biggest event of the year – Cota 2 world championship \"The Innernational\" is right around the corner. $... | [{"input": "16 50\n57794 44224 38309 41637 11732 44974 655 27143 11324 49584 3371 17159 26557 38800 33033 18231 26264 14765 33584 30879 46988 60703 52973 47349 22720 51251 54716 29642 7041 54896 12197 38530 51481 43063 55463 2057 48064 41953 16250 21272 34003 51464 50389 30417 45901 38895 25949 798 29404 55166\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOn March 14, the day of the number $\\pi$ is celebrated all over the world. This is a very important mathemat... | [{"input": "9\n000\n3\n4141592653\n141592653589793238462643383279\n31420\n31415\n314159265358\n27182\n314159265358979323846264338327\n", "output": "0\n1\n0\n0\n3\n5\n12\n0\n30\n"}, {"input": "3\n314\n315\n314\n", "output": "3\n2\n3\n"}, {"input": "2\n0314\n0003000\n", "output": "0\n0\n"}, {"input": "1\n31415653588880\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThis problem consists of three subproblems: for solving subproblem C1 you will receive 4 points, for solving ... | [{"input": "40 3\n1 62395\n5 40319\n4 165445\n10 137479\n10 47829\n8 9741\n5 148106\n10 25494\n10 162856\n2 106581\n0 194523\n9 148086\n1 100862\n6 147600\n6 107486\n6 166873\n7 16721\n4 22192\n0 8827\n1 197146\n10 8949\n0 150443\n9 148348\n3 143935\n1 139371\n7 128821\n10 107760\n4 141821\n1 35852\n9 107522\n10 54717\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya has got three integers n, m and k. He'd like to find three integer points (x_1, y_1), (x_2, y_2), (x_3,... | [{"input": "1000000000 1000000000 2\n", "output": "YES\n0 0\n1000000000 0\n0 1000000000\n"}, {"input": "1000000000 1000000001 2\n", "output": "YES\n0 0\n1000000000 0\n0 1000000001\n"}, {"input": "1000000010 1000000001 2\n", "output": "YES\n0 0\n1000000010 0\n0 1000000001\n"}, {"input": "236887699 1000000000 2\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRobbers, who attacked the Gerda's cab, are very successful in covering from the kingdom police. To make the g... | [{"input": "1000000000 1000000000\n", "output": "0\n"}, {"input": "1010000000 1000000000\n", "output": "0\n"}, {"input": "1000000000 1000000100\n", "output": "0\n"}, {"input": "282475250 282475250\n", "output": "0\n"}, {"input": "421414245 4768815\n", "output": "0\n"}, {"input": "421414245 5452708\n", "output": "0\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWith the motto \"Creating your own path,\" a shrine created a fortune-telling fortune with its own hands. Ask... | [{"input": "-1 -2 9 6\n3 -2 7 6\n-1 0 9 0\n2 2 0 -1\n1 2 2 0\n-3 -1 3 1\n0 0 0 0", "output": "syo-kichi\nsyo-kichi\n"}, {"input": "-1 -2 22 6\n3 -2 7 10\n-1 0 9 0\n3 2 0 -1\n1 1 2 1\n-3 -1 3 1\n0 0 0 0", "output": "syo-kichi\nkyo\n"}, {"input": "-1 -1 22 6\n3 -2 7 10\n-1 0 9 0\n3 2 0 -1\n1 1 2 1\n-3 -1 3 1\n0 0 0 0", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIt is important to use strong passwords to make the Internet more secure. At the same time, it is very import... | [{"input": "passxord", "output": "INVALID\n"}, {"input": "parsxosd", "output": "INVALID\n"}, {"input": "parsxpsd", "output": "INVALID\n"}, {"input": "qarsxpsd", "output": "INVALID\n"}, {"input": "qarxspsd", "output": "INVALID\n"}, {"input": "dspsxraq", "output": "INVALID\n"}, {"input": "qarxspsc", "output": "INVALID\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe door of Snuke's laboratory is locked with a security code.\nThe security code is a 4-digit number. We say... | [{"input": "8080\n", "output": "Good\n"}, {"input": "0930\n", "output": "Good\n"}, {"input": "8901\n", "output": "Good\n"}, {"input": "3695\n", "output": "Good\n"}, {"input": "4649\n", "output": "Good\n"}, {"input": "12101", "output": "Good\n"}, {"input": "12904", "output": "Good\n"}, {"input": "24106", "output": "Good... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a 4-character string S consisting of uppercase English letters.\nDetermine if S consists of exa... | [{"input": "ASSA\n", "output": "Yes\n"}, {"input": "FFEE\n", "output": "Yes\n"}, {"input": "AVVA\n", "output": "Yes\n"}, {"input": "HHTT\n", "output": "Yes\n"}, {"input": "ILIL\n", "output": "Yes\n"}, {"input": "STOP\n", "output": "No\n"}, {"input": "FREE\n", "output": "No\n"}, {"input": "ZZZZ\n", "output": "No\n"}, {"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThis is a problem that involves adding numbers to items in a list.\nIn a list you will have to add the item's... | [{"input": "[2, 7, 5, 9, 100, 34, 32, 0]\n3", "output": "[[4, 8, 7, 9, 101, 35, 34, 0]]", "fn_name": "solve"}, {"input": "[1000, 999, 998, 997]\n5", "output": "[[1000, 1003, 1001, 999]]", "fn_name": "solve"}, {"input": "[33, 23, 45, 78, 65]\n10", "output": "[[36, 26, 50, 86, 70]]", "fn_name": "solve"}, {"input": "[0, 0... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n## Task\n\nYour challenge is to write a function named `getSlope`/`get_slope`/`GetSlope` that calculates the ... | [{"input": "[8, 3]\n[-4, 5]", "output": "[-0.16666666666666666]", "fn_name": "getSlope"}, {"input": "[-5, 9]\n[-5, 12]", "output": "[null]", "fn_name": "getSlope"}, {"input": "[-5, 9]\n[-5, 9]", "output": "[null]", "fn_name": "getSlope"}, {"input": "[11, 1]\n[1, 11]", "output": "[-1]", "fn_name": "getSlope"}, {"input":... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRobbers, who attacked the Gerda's cab, are very successful in covering from the kingdom police. To make the g... | [{"input": "1000000000 1000000000\n", "output": "0\n"}, {"input": "1000000000 1000000000\n", "output": "0\n"}, {"input": "1000000000 1000000001\n", "output": "0\n"}, {"input": "1000000000 1000000011\n", "output": "0\n"}, {"input": "1100000000 1000000011\n", "output": "0\n"}, {"input": "282475250 282475250\n", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nUnlike Knights of a Round Table, Knights of a Polygonal Table deprived of nobility and happy to kill each oth... | [{"input": "11 10\n1 2 3 4 5 6 7 8 9 10 11\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "1000000000 2000000000 3000000000 4000000000 5000000000 6000000000 7000000000 8000000000 9000000000 10000000000 11000000000 "}, {"input": "11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet's define a forest as a non-directed acyclic graph (also without loops and parallel edges). One day Misha ... | [{"input": "19\n1 13\n0 0\n1 9\n1 11\n1 11\n2 3\n2 30\n0 -1\n1 5\n1 2\n0 0\n5 29\n1 6\n2 11\n0 0\n0 0\n0 0\n0 -1\n2 13\n", "output": "10\n0 13\n2 9\n3 11\n4 11\n8 5\n12 6\n13 11\n5 11\n6 18\n11 18\n\n"}, {"input": "19\n1 13\n0 0\n1 9\n1 11\n1 11\n2 3\n2 30\n0 -1\n1 5\n1 2\n0 0\n5 29\n1 6\n2 11\n0 0\n0 0\n0 0\n0 0\n2 13... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere is a tree T with N vertices, numbered 1 through N. For each 1 ≤ i ≤ N - 1, the i-th edge connects verti... | [{"input": "10\n2 4\n2 5\n8 3\n10 7\n1 7\n2 8\n9 10\n8 6\n10 8", "output": "220\n"}, {"input": "10\n1 4\n2 5\n1 3\n10 1\n1 6\n4 8\n9 8\n7 10\n10 2", "output": "122\n"}, {"input": "10\n2 4\n2 5\n2 3\n10 7\n1 6\n2 10\n9 5\n8 7\n10 6", "output": "194\n"}, {"input": "10\n1 4\n2 5\n1 3\n10 1\n1 6\n4 8\n9 3\n7 10\n10 2", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRational numbers are numbers represented by ratios of two integers. For a prime number p, one of the elementa... | [{"input": "2 10\n5 10\n19 111\n0 0", "output": "10/7 7/5\n9/4 2/1\n109/25 61/14\n"}, {"input": "11 5\n10 10\n5 100\n0 0", "output": "4/1 3/1\n10/3 3/1\n85/38 38/17\n"}, {"input": "2 5\n3 14\n26 111\n0 0", "output": "3/2 4/3\n7/4 12/7\n51/10 107/21\n"}, {"input": "8 24\n3 10\n5 110\n0 0", "output": "17/6 14/5\n7/4 5/3\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nChef's new hobby is painting, but he learned the fact that it's not easy to paint 2D pictures in a hard way, ... | [{"input": "3\n4\n1 6 4 -2\n0\n0 9 -1 10\n0\n-1 3 6", "output": "No\nNo\nNo\n"}, {"input": "3\n4\n1 6 4 0\n0\n-1 9 -1 10\n0\n-1 3 6", "output": "No\nNo\nNo\n"}, {"input": "3\n4\n1 6 4 1\n0\n-1 9 -1 10\n0\n-1 3 6", "output": "No\nNo\nNo\n"}, {"input": "3\n4\n2 9 1 3\n3\n1 1 1 10\n0\n18 3 1", "output": "No\nYes\nNo\n"}, ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMr. Takahashi has a string s consisting of lowercase English letters. He repeats the following operation on s... | [{"input": "codefestival\n101", "output": "aaaafeaaiaal\n"}, {"input": "cdoeffstival\n101", "output": "aaaaffaaiaal\n"}, {"input": "cdoeffstival\n111", "output": "aaaaafativam\n"}, {"input": "lavitsffeodc\n111", "output": "aaaaaaaaeadg\n"}, {"input": "caoeffstivdl\n111", "output": "aaaaaaativdo\n"}, {"input": "cdoefest... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIt is only six months until Christmas, and AtCoDeer the reindeer is now planning his travel to deliver gifts.... | [{"input": "8\n121 1 -1 -1 -3 3 0 1", "output": "124\n"}, {"input": "8\n0 -4 -1 21 -2 -15 4 2", "output": "36\n"}, {"input": "8\n0 -3 -1 27 -6 -18 4 2", "output": "45\n"}, {"input": "8\n-2 -1 0 1 3 -143 0 1", "output": "146\n"}, {"input": "8\n-2 -1 0 1 3 -149 0 1", "output": "152\n"}, {"input": "8\n0 -5 0 15 -1 -10 2 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nInna is a great piano player and Dima is a modest guitar player. Dima has recently written a song and they wa... | [{"input": "10\n2 2 2 4 10 6 7 16 9 17\n1 2 3 5 5 6 7 8 18 10\n", "output": "157\n"}, {"input": "10\n1 2 0 4 10 4 7 16 9 17\n1 2 3 5 5 6 7 8 18 10\n", "output": "154\n"}, {"input": "10\n1 2 2 4 10 6 7 16 9 17\n1 2 3 5 5 6 7 8 18 10\n", "output": "157\n"}, {"input": "10\n1 2 2 4 10 4 7 16 9 17\n1 2 3 5 5 6 7 8 18 10\n",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Don't give me five!\n\nIn this kata you get the start number and the end number of a region and should retu... | [{"input": "-14\n-1", "output": "[13]", "fn_name": "dont_give_me_five"}, {"input": "-4\n17", "output": "[20]", "fn_name": "dont_give_me_five"}, {"input": "-4\n37", "output": "[38]", "fn_name": "dont_give_me_five"}, {"input": "-14\n-6", "output": "[9]", "fn_name": "dont_give_me_five"}, {"input": "4\n17", "output": "[12]... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMany years have passed, and n friends met at a party again. Technologies have leaped forward since the last m... | [{"input": "10\n489 685\n857 870\n736 221\n687 697\n166 360\n265 200\n738 519\n393 760\n66 176\n798 160\n", "output": "3231747\n"}, {"input": "10\n489 685\n857 870\n736 221\n687 697\n166 360\n265 200\n738 519\n393 760\n66 176\n798 160\n", "output": "3231747\n"}, {"input": "10\n864 874\n534 702\n73 363\n856 895\n827 72\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nToday is Chef's birthday. His mom has surprised him with truly fruity gifts: 2 fruit baskets. The first baske... | [{"input": "3\n-1 0 1\n13 0 5\n-1 4 3", "output": "0\n8\n2\n"}, {"input": "3\n-1 0 0\n13 0 5\n-1 4 3", "output": "1\n8\n2\n"}, {"input": "3\n10 -2 0\n7 0 2\n2 4 1", "output": "12\n5\n1\n"}, {"input": "3\n-1 0 0\n14 0 5\n-1 4 3", "output": "1\n9\n2\n"}, {"input": "3\n10 -2 0\n7 0 2\n2 6 1", "output": "12\n5\n3\n"}, {"in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nNadeko's birthday is approaching! As she decorated the room for the party, a long garland of Dianthus-shaped ... | [{"input": "100\ndddddccccdddddaaaaabbbbbbbbbbbbbaaacdcabbacccacccccbdbbadddbbddddbdaaccacdddbbbaddddbbbbdcbbbdddddda\n50\n54 b\n48 d\n45 b\n52 c\n52 a\n48 a\n54 b\n45 a\n47 d\n50 d\n53 a\n34 a\n51 b\n48 d\n47 d\n47 a\n48 d\n53 b\n52 d\n54 d\n46 a\n38 a\n52 b\n49 a\n49 b\n46 c\n99 a\n45 b\n35 c\n55 c\n51 c\n46 d\n54 d\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAn infinitely long railway has a train consisting of n cars, numbered from 1 to n (the numbers of all the car... | [{"input": "50\n39 8 41 9 45 1 5 18 38 31 28 7 12 49 33 19 26 6 42 13 37 27 2 21 20 22 14 16 48 47 32 50 25 17 35 24 36 4 29 15 43 10 11 30 40 46 3 23 44 34\n", "output": "46\n"}, {"input": "50\n43 15 10 33 32 31 13 7 5 22 36 1 25 14 38 19 8 6 24 42 28 21 44 35 4 3 49 30 27 46 2 9 17 37 45 41 18 39 12 11 16 20 50 26 29... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAs we all know, Max is the best video game player among her friends. Her friends were so jealous of hers, tha... | [{"input": "100 1\n92 93 p\n", "output": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or i... | [{"input": "10 10\n.....SSSSS\n.....SSSSS\n.....SSSSS\n.....SSSSS\n.....SSSSS\n..........\n..........\n..........\n..........\n..........\n", "output": "75\n"}, {"input": "10 10\nS...SSSSSS\nS...SSSSSS\nS...SSSSSS\nS...SSSSSS\nS...SSSSSS\nS...SSSSSS\nS...SSSSSS\nS...SSSSSS\nS...SSSSSS\nS...SSSSSS\n", "output": "30\n"},... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTake 2 strings `s1` and `s2` including only letters from `a`to `z`.\nReturn a new **sorted** string, the long... | [{"input": "\"loopingisfunbutdangerous\"\n\"lessdangerousthancoding\"", "output": "[\"abcdefghilnoprstu\"]", "fn_name": "longest"}, {"input": "\"agenerationmustconfrontthelooming\"\n\"codewarrs\"", "output": "[\"acdefghilmnorstuw\"]", "fn_name": "longest"}, {"input": "\"inmanylanguages\"\n\"theresapairoffunctions\"", "... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nEmuskald is a well-known illusionist. One of his trademark tricks involves a set of magical boxes. The essenc... | [{"input": "15\n999999986 268435456\n999999987 67108864\n999999988 16777216\n999999989 4194304\n999999990 1048576\n999999991 262144\n999999992 65536\n999999993 16384\n999999994 4096\n999999995 1024\n999999996 256\n999999997 64\n999999998 16\n999999999 4\n1000000000 1\n", "output": "1000000001\n"}, {"input": "15\n999999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMasha wants to open her own bakery and bake muffins in one of the n cities numbered from 1 to n. There are m ... | [{"input": "8 57 3\n1 3 15\n2 3 1\n1 7 21\n1 2 11\n2 1 16\n1 6 4\n1 3 2\n3 7 17\n5 8 3\n1 3 18\n1 4 3\n1 2 1\n2 8 14\n1 4 17\n4 5 21\n2 3 6\n3 5 11\n2 8 11\n3 4 1\n1 3 9\n1 4 3\n2 3 12\n1 5 9\n2 3 15\n1 2 14\n1 2 10\n1 4 19\n5 7 7\n5 8 20\n5 8 1\n1 4 3\n4 5 8\n5 7 1\n1 2 14\n4 5 9\n6 7 2\n2 6 9\n2 6 4\n3 7 4\n3 5 11\n4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Task\n\nYou are given a function that should insert an asterisk (`*`) between every pair of **even digits**... | [{"input": "[1, 4, 64, 68, 67, 23, 1]", "output": "[\"14*6*4*6*8*67231\"]", "fn_name": "asterisc_it"}, {"input": "9682135", "output": "[\"96*8*2135\"]", "fn_name": "asterisc_it"}, {"input": "5312708", "output": "[\"531270*8\"]", "fn_name": "asterisc_it"}, {"input": "\"0000\"", "output": "[\"0*0*0*0\"]", "fn_name": "ast... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya has the sequence consisting of n integers. Vasya consider the pair of integers x and y k-interesting, i... | [{"input": "100 14\n8192 8192 8192 8192 8191 8192 8192 8192 8192 8192 8191 8191 8191 8192 8191 8191 8191 8192 8192 8192 8192 8192 8191 8191 8191 8192 8191 8192 8192 8192 8192 8192 8192 8191 8191 8192 8192 8191 8191 8192 8192 8192 8191 8191 8192 8191 8191 8191 8191 8191 8191 8192 8191 8191 8192 8191 8191 8192 8192 8191 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMusicians of a popular band \"Flayer\" have announced that they are going to \"make their exit\" with a world... | [{"input": "7 7\n1 6 745325\n2 3 3581176\n2 4 19\n3 6 71263060078\n5 4 141198\n7 4 163953\n5 6 15994\n1 297404206755 82096176217 14663411 187389745 21385 704393\n", "output": "1 335807 7498159 335769 53373 21385 663675 \n"}, {"input": "7 7\n1 6 745325\n2 3 3581176\n2 4 19\n3 6 71263060078\n5 4 170098\n7 4 163953\n5 6 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLittle C loves number «3» very much. He loves all things about it.\n\nNow he is playing a game on a chessboar... | [{"input": "1000000000 1000000000\n", "output": "1000000000000000000\n"}, {"input": "1000001000 1000000000\n", "output": "1000001000000000000\n"}, {"input": "1000001000 1100000000\n", "output": "1100001100000000000\n"}, {"input": "567298709 2116937786\n", "output": "1200936073031118274\n"}, {"input": "567298709 1327099... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAfter battling Shikamaru, Tayuya decided that her flute is too predictable, and replaced it with a guitar. Th... | [{"input": "58260522 77914575 2436426 24979445 61648772 23690081\n10\n582107247 906728404 411434947 673536177 411497300 488012525 561127307 800305059 992325267 112738006\n", "output": "804109112\n"}, {"input": "58260522 77914575 2436426 24979445 61648772 23690081\n10\n582107247 906728404 411434947 673536177 411497300 4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nTakahashi has a string S of length N consisting of digits from 0 through 9.\nHe loves the prime number P. He ... | [{"input": "20 11\n33883322005544116655\n", "output": "68\n"}, {"input": "20 16\n10763178948652303319", "output": "136\n"}, {"input": "20 16\n46280926482052991001", "output": "139\n"}, {"input": "20 8\n33883322005544116655", "output": "171\n"}, {"input": "20 2\n33883322005544116655", "output": "103\n"}, {"input": "20 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are n employees working in company \"X\" (let's number them from 1 to n for convenience). Initially the... | [{"input": "2 10\n2 2\n1 2 1\n3 1 1\n3 2 1\n3 1 1\n2 2\n3 1 2\n3 1 1\n3 2 1\n3 1 2\n", "output": "NO\nYES\nNO\nYES\nNO\nYES\nYES\n"}, {"input": "2 10\n2 2\n1 2 1\n3 1 1\n3 1 1\n3 1 1\n2 2\n3 1 2\n3 1 1\n3 2 1\n3 1 2\n", "output": "NO\nNO\nNO\nYES\nNO\nYES\nYES\n"}, {"input": "2 10\n2 2\n1 2 1\n3 1 1\n3 1 1\n3 2 1\n2 2\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given four integers $n$, $B$, $x$ and $y$. You should build a sequence $a_0, a_1, a_2, \\dots, a_n$ w... | [{"input": "2\n100000 1000000000 1000000000 1\n100000 1 1000000000 10000\n", "output": "99995000050000\n-50000500000000\n"}, {"input": "7\n1 1 1 1\n2 2 2 2\n3 3 3 3\n4 4 4 4\n5 5 5 5\n6 6 6 6\n7 7 7 7\n", "output": "1\n2\n6\n8\n15\n18\n28\n"}, {"input": "3\n5 100 1 30\n7 1000000000 1000000000 1000000000\n4 1 7 3\n", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nПамять компьютера состоит из n ячеек, которые выстроены в ряд. Пронумеруем ячейки от 1 до n слева направо. Пр... | [{"input": "24\n0 0 6 6 6 0 22 22 0 23 23 0 19 19 19 19 0 0 17 0 0 3 3 3\n", "output": "14\n"}, {"input": "21\n0 11 11 11 11 0 7 0 12 12 12 12 12 0 19 19 19 0 1 1 1\n", "output": "11\n"}, {"input": "24\n6 6 0 0 0 22 0 0 23 0 0 19 0 0 0 0 17 17 0 3 3 0 0 0\n", "output": "7\n"}, {"input": "21\n11 0 0 0 0 7 0 12 0 0 0 0 0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nCreate a function `close_compare` that accepts 3 parameters: `a`, `b`, and an optional `margin`. The function... | [{"input": "1.99\n5\n3", "output": "[-1]", "fn_name": "close_compare"}, {"input": "8.1\n5\n3", "output": "[1]", "fn_name": "close_compare"}, {"input": "2\n5\n3", "output": "[0]", "fn_name": "close_compare"}, {"input": "5\n5\n3", "output": "[0]", "fn_name": "close_compare"}, {"input": "8\n5\n3", "output": "[0]", "fn_nam... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet's imagine: there is a chess piece billiard ball. Its movements resemble the ones of a bishop chess piece.... | [{"input": "1000000 1000000\n", "output": "1000000\n"}, {"input": "666667 1000000\n", "output": "333334\n"}, {"input": "871866 348747\n", "output": "174374\n"}, {"input": "863029 287677\n", "output": "287677\n"}, {"input": "962963 1000000\n", "output": "37038\n"}, {"input": "701905 526429\n", "output": "175477\n"}, {"i... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPetya loves hockey very much. One day, as he was watching a hockey match, he fell asleep. Petya dreamt of bei... | [{"input": "100\nqn\nBE\nyN\nep\nPq\nXz\nLM\nEZ\ndb\nMn\nbn\nFe\nqA\nzc\nyq\npC\nyA\nWk\nYq\nrs\noD\nvD\nzW\nxZ\nbl\nur\nkf\ndf\nLS\nUW\nMy\nhR\nsh\nNh\nog\nCW\nor\nzo\nrO\nao\nXH\nDq\nKa\nlL\nYQ\nOh\nRZ\nAx\nta\nko\nDn\nNg\nNy\nDB\nYD\njO\nAp\nFT\noB\nNc\nwB\nHO\neW\nAc\nDr\nMt\nDf\nbF\nFP\nRa\nnF\nhF\nXC\nnG\nan\nZY\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a directed graph consisting of $n$ vertices. Each directed edge (or arc) labeled with a single ... | [{"input": "3 11\n+ 1 2 a\n+ 1 3 c\n+ 3 2 a\n+ 2 1 a\n? 6\n? 5\n- 2 1\n- 3 2\n+ 2 1 c\n+ 3 2 d\n? 5\n", "output": "YES\nYES\nYES\n"}, {"input": "3 11\n+ 1 2 a\n+ 1 3 c\n+ 3 2 a\n+ 2 1 a\n? 6\n? 5\n- 2 1\n- 3 2\n+ 2 1 c\n+ 3 3 d\n? 5\n", "output": "YES\nYES\nYES\n"}, {"input": "3 11\n+ 1 2 a\n+ 1 3 c\n+ 3 2 a\n+ 2 1 a\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nn boys and m girls came to the party. Each boy presented each girl some integer number of sweets (possibly ze... | [{"input": "2 2\n100000000 100000000\n100000000 100000000\n", "output": "400000000\n"}, {"input": "2 2\n100000000 100000000\n101000000 100000000\n", "output": "401000000\n"}, {"input": "2 2\n72765050 72765049\n108366500 77716490\n", "output": "331613089\n"}, {"input": "2 2\n23720786 43602829\n112215563 67248253\n", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVera adores poems. All the poems Vera knows are divided into quatrains (groups of four lines) and in each qua... | [{"input": "7 3\nferwljzwakxedlgwl\noerwljzwakxedlgwl\nhyqombizhuhxedprb\netptjrizhuhxedprb\nurtuckar\ndkartmwramklcmi\nrurtuckar\nnurartmwramklcmi\niraziomsv\nsaziomsv\nbprapiqpayzurgij\nusyemayzurgij\nztstmeecvmkvuu\nquexlecvmkvuu\nrlhwecvmkvuu\nzecvmkvuu\niikymgbncljtub\nqiikymgbncljtub\nbcavhexqamyszgfya\nojexqamys... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nStory\nJumbo Juice makes a fresh juice out of fruits of your choice.Jumbo Juice charges $5 for regular fruits... | [{"input": "[\"blackBerry\", \"coconut\", \"avocado\"]", "output": "[8]", "fn_name": "mix_fruit"}, {"input": "[\"BlACKbeRrY\", \"cOcONuT\", \"avoCaDo\"]", "output": "[8]", "fn_name": "mix_fruit"}, {"input": "[\"watermelon\", \"cherry\", \"avocado\"]", "output": "[8]", "fn_name": "mix_fruit"}, {"input": "[\"watermelon\"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nMost of this problem is by the original author of [the harder kata](https://www.codewars.com/kata/556206664ef... | [{"input": "1073741823", "output": "[false]", "fn_name": "polydivisible"}, {"input": "381654729", "output": "[true]", "fn_name": "polydivisible"}, {"input": "123220", "output": "[false]", "fn_name": "polydivisible"}, {"input": "1020005", "output": "[true]", "fn_name": "polydivisible"}, {"input": "9876545", "output": "[... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nBerland Football Cup starts really soon! Commentators from all over the world come to the event.\n\nOrganizer... | [{"input": "500000000001 1000000000000 100 100\n", "output": "49999999999900\n"}, {"input": "500000000001 1000000000000 100 100\n", "output": "49999999999900\n"}, {"input": "500000000001 1000000000000 110 100\n", "output": "50000000000100\n"}, {"input": "1000000000000 750000000001 10 100\n", "output": "5000000000020\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSpoonerize... with numbers... numberize?... numboonerize?... noonerize? ...anyway! If you don't yet know wha... | [{"input": "[1000000, \"hello\"]", "output": "[\"invalid array\"]", "fn_name": "noonerize"}, {"input": "[\"pippi\", 9999999]", "output": "[\"invalid array\"]", "fn_name": "noonerize"}, {"input": "[\"pippi\", \"hello\"]", "output": "[\"invalid array\"]", "fn_name": "noonerize"}, {"input": "[1000000, 9999999]", "output":... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFrom the FAQ:\n\nWhat am I allowed to post as a comment for a problem? \n\nDo NOT post code.\nDo NOT post a c... | [{"input": "7\n1\n?\n2\n0?\n11\n69259?087\n4\n??\n2\n0?1\n4\n?????\n3\n22", "output": "0\n01\n692591087\n01\nNO\n01012\nNO\n"}, {"input": "7\n1\n?\n2\n0?\n11\n69259?087\n4\n??\n2\n0?1\n4\n?????\n3\n15", "output": "0\n01\n692591087\n01\nNO\n01012\n15\n"}, {"input": "7\n1\n?\n2\n0?\n11\n69259?087\n4\n?>\n2\n0?1\n4\n?????... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDaniel is watching a football team playing a game during their training session. They want to improve their p... | [{"input": "1\n200\n5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThis is a story in a depopulated area. In this area, houses are sparsely built along a straight road called C... | [{"input": "6\n5 2\n10 30 40 70 100\n7 3\n3 5 10 53 21 26 28\n1 1\n100\n2 1\n-1 1000000\n3 5\n30 70 211\n6 5\n0 10 20 30 40 50", "output": "60\n-23\n0\n1000001\n0\n10\n"}, {"input": "6\n5 2\n10 30 40 70 100\n7 3\n3 5 10 53 21 26 28\n1 1\n100\n2 1\n-1 1000000\n3 5\n30 70 211\n6 5\n0 10 20 8 40 50", "output": "60\n-23\n0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nHakone Ekiden is one of the Japanese New Year's traditions. In Hakone Ekiden, 10 runners from each team aim f... | [{"input": "10\nU\nD\nU\nD\nU\nD\nU\nD\nU\nD", "output": "608"}, {"input": "8\nT\nD\nD\nD\nD\nD\nD\nC", "output": "0\n"}, {"input": "8\nT\nD\nD\nD\nD\nD\nC\nC", "output": "0\n"}, {"input": "8\nT\nD\nD\nD\nD\nE\nC\nC", "output": "0\n"}, {"input": "8\nS\nD\nD\nD\nD\nE\nC\nC", "output": "0\n"}, {"input": "8\nS\nD\nD\nD\nD... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFor an integer N, we will choose a permutation \\{P_1, P_2, ..., P_N\\} of \\{1, 2, ..., N\\}.\nThen, for eac... | [{"input": "1000000000\n", "output": "499999999500000000\n"}, {"input": "999999999\n", "output": "499999998500000001\n"}, {"input": "999999998\n", "output": "499999997500000003\n"}, {"input": "234679769\n", "output": "27537296871606796\n"}, {"input": "160767\n", "output": "12922933761\n"}, {"input": "569\n", "output": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPetya loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation d... | [{"input": "1000000000\n", "output": "4444477777\n"}, {"input": "1000100000\n", "output": "4444477777\n"}, {"input": "1211766791\n", "output": "4444477777\n"}, {"input": "1101704081\n", "output": "4444477777\n"}, {"input": "1010000000\n", "output": "4444477777\n"}, {"input": "444000000\n", "output": "4444477777\n"}, {"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet S(n) denote the sum of the digits in the decimal notation of n.\nFor example, S(123) = 1 + 2 + 3 = 6.\nWe... | [{"input": "792\n", "output": "1\n2\n3\n4\n5\n6\n7\n8\n9\n19\n29\n39\n49\n59\n69\n79\n89\n99\n199\n299\n399\n499\n599\n699\n799\n899\n999\n1099\n1199\n1299\n1399\n1499\n1599\n1699\n1799\n1899\n1999\n2999\n3999\n4999\n5999\n6999\n7999\n8999\n9999\n10999\n11999\n12999\n13999\n14999\n15999\n16999\n17999\n18999\n19999\n209... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA tree is an undirected connected graph without cycles. The distance between two vertices is the number of ed... | [{"input": "15 1\n12 9\n13 7\n1 3\n10 4\n9 2\n2 15\n11 4\n2 14\n10 8\n6 7\n12 5\n8 7\n3 10\n10 2\n", "output": "346\n"}, {"input": "15 1\n12 9\n13 7\n1 3\n10 4\n9 2\n2 15\n11 4\n2 14\n10 8\n6 7\n12 5\n8 7\n3 10\n10 2\n", "output": "346\n"}, {"input": "15 1\n12 9\n13 7\n1 3\n10 4\n9 2\n2 15\n11 4\n2 14\n10 8\n6 8\n12 5\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou've just recently been hired to calculate scores for a Dart Board game!\n\nScoring specifications:\n\n* 0... | [{"input": "[15, 20, 30, 31, 32, 44, 100]", "output": "[0]", "fn_name": "score_throws"}, {"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9]", "output": "[65]", "fn_name": "score_throws"}, {"input": "[0, 5, 10, 10.5, 4.5]", "output": "[30]", "fn_name": "score_throws"}, {"input": "[1, 2, 3, 4]", "output": "[140]", "fn_name": "score_... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDuring the lunch break all n Berland State University students lined up in the food court. However, it turned... | [{"input": "10\n419946 201769\n245945 0\n842799 113073\n836998 245945\n0 794376\n692107 836998\n113073 904403\n904403 987165\n201769 692107\n794376 842799\n", "output": "419946 794376 201769 842799 692107 113073 836998 904403 245945 987165 \n"}, {"input": "10\n419946 201769\n245945 0\n842799 113073\n836998 245945\n0 79... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a permutation p of length n. Also you are given m foe pairs (a_{i}, b_{i}) (1 ≤ a_{i}, b_{i} ≤ ... | [{"input": "100 10\n19 55 91 50 31 23 60 84 38 1 22 51 27 76 28 98 11 44 61 63 15 93 52 3 66 16 53 36 18 62 35 85 78 37 73 64 87 74 46 26 82 69 49 33 83 89 56 67 71 25 39 94 96 17 21 6 47 68 34 42 57 81 13 10 54 2 48 80 20 77 4 5 59 30 90 95 45 75 8 88 24 41 40 14 97 32 7 9 65 70 100 99 72 58 92 29 79 12 86 43\n58 26\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an array $a_1, a_2, \\dots , a_n$. Array is good if for each pair of indexes $i < j$ the condit... | [{"input": "3\n1\n7\n4\n1 1 3 5\n6\n3 2 1 5 6 4\n", "output": "7\n5 3 1 1\n6 5 4 3 2 1\n"}, {"input": "3\n1\n7\n4\n1 1 3 5\n6\n3 2 1 5 6 4\n", "output": "7\n5 3 1 1\n6 5 4 3 2 1\n"}, {"input": "3\n1\n7\n4\n0 1 3 5\n6\n3 2 1 5 6 4\n", "output": "7\n5 3 1 0\n6 5 4 3 2 1\n"}, {"input": "3\n1\n7\n4\n0 1 1 5\n6\n3 2 1 5 6 4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVanya and his friend Vova play a computer game where they need to destroy n monsters to pass a level. Vanya's... | [{"input": "20 6 15\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n", "output": "Both\nBoth\nVova\nVova\nVanya\nVova\nVova\nBoth\nBoth\nVova\nVova\nVanya\nVova\nVova\nBoth\nBoth\nVova\nVova\nVanya\nVova\n"}, {"input": "20 5 15\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe well-known Fibonacci sequence $F_0, F_1, F_2,\\ldots $ is defined as follows: $F_0 = 0, F_1 = 1$. For ... | [{"input": "1 123456 961946\n", "output": "11954016000000000001 3158031000000000000\n"}, {"input": "1 123456 961946\n", "output": "11954016000000000001 3158031000000000000\n"}, {"input": "10000 154768 13\n", "output": "11015448000000000001 9428455500000000000\n"}, {"input": "0 123456 961946\n", "output": "1195401600000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn this problem, we will deal with binary strings. Each character of a binary string is either a 0 or a 1. We... | [{"input": "50\n01110100101100100100011001100001110010010000000101\n50\n27 18 7\n22 35 2\n50 35 1\n41 16 1\n27 5 5\n11 6 33\n7 19 2\n9 12 33\n14 37 4\n1 22 8\n22 3 5\n50 42 1\n50 38 1\n29 20 2\n20 34 17\n20 4 29\n16 21 3\n11 43 3\n15 45 1\n12 28 3\n31 34 13\n43 1 8\n3 41 1\n18 3 13\n29 44 6\n47 44 3\n40 43 2\n6 46 5\n9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA colored stripe is represented by a horizontal row of n square cells, each cell is pained one of k colors. Y... | [{"input": "200 2\nBABAABBABBABBABABBBABAAABABBABABBBAABBBBABBAABBABABAAAAABAABBBAAAAAAABBBABAAAABABBBAABABAABAABBBAABBABAAAABABAAAABABABBBABBBAAABAAABAAABABAAABABABBABABABBABBBABBBBBABABBBABAAABAAABAABBAABBABBBBBABBBAB\n", "output": "87\nABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA category page displays a set number of products per page, with pagination at the bottom allowing the user t... | [{"input": "43\n15\n3456", "output": "[\"Showing 631 to 645 of 3456 Products.\"]", "fn_name": "pagination_text"}, {"input": "2\n30\n350", "output": "[\"Showing 31 to 60 of 350 Products.\"]", "fn_name": "pagination_text"}, {"input": "3\n10\n26", "output": "[\"Showing 21 to 26 of 26 Products.\"]", "fn_name": "pagination_... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Description:\n\n Find the longest successive exclamation marks and question marks combination in the string... | [{"input": "\"!!???!?????\"", "output": "[\"!?????\"]", "fn_name": "find"}, {"input": "\"!????!!!?\"", "output": "[\"????!!!\"]", "fn_name": "find"}, {"input": "\"!!???!????\"", "output": "[\"!!???\"]", "fn_name": "find"}, {"input": "\"!?!!??!!!?\"", "output": "[\"??!!!\"]", "fn_name": "find"}, {"input": "\"!?!!\"", "o... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA subsequence of length |x| of string s = s1s2... s|s| (where |s| is the length of string s) is a string x = ... | [{"input": "ctkhagrifaztmnxhmqztzibnmzzkojiztvrkfeoqegvwtbxlvvjhebshqaicsovtkcdovytimjggglyxlvglgunbohnkxargymbqvzgsnvjzgxivdgnaesgxqcruaopjuqsyyorrobnelehjnxcetveehlbmeskptivsuhuqupbieumycwczxyqjtwfofehfkpqmjngygwxkaviuyouiippgvlxjgtkxmhcwtzacbllsybgiujyryngapfwjkkyapfgxtcdpc\nctkhagrifaztmnxhmqztzibnmzzkojiztvrkfeoqe... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nNukes has an integer that can be represented as the bitwise OR of one or more integers between A and B (inclu... | [{"input": "271828182845904523\n1128816364578546661", "output": "881093321760942453\n"}, {"input": "271828182845904523\n1080587834201094862", "output": "881093321760942453\n"}, {"input": "271828182845904523\n1104519973481288013", "output": "881093321760942453\n"}, {"input": "271828182845904523\n1031296135146934819", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe ancient Berlanders believed that the longer the name, the more important its bearer is. Thus, Berland kin... | [{"input": "50\nagecd\ncghafi\nfiide\niecc\njbdcfjhgd\ndiee\nhfeg\nehc\ngfijgjh\ngacaifebg\ndicbbddc\nhjgciaei\njjcdh\ng\ngc\ncf\nhfdjhd\nc\nicidbec\nji\neeh\ncgeejggc\nacfd\njjg\najefdj\neghhebiic\nbih\ngbb\njjaa\nidc\ngafi\necg\ndbigbjiehj\ncedif\nahidfaaajg\nhfhhiccbgb\ndgegjgieif\nhgjebhfdc\nj\nahehd\nahdah\nbijbhh... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya has recently developed a new algorithm to optimize the reception of customer flow and he considered the... | [{"input": "100\n1525 7246 2782 4070 10420 5459 8162 8074 5197 4808 4599 8161 2110 2216 7434 9937 2350 9406 9497 8027 2100 1600 7508 3441 4356 3928 8448 3788 7189 9186 7923 5170 6940 6986 9909 8418 2963 9146 8411 6136 6753 3006 2726 4290 7310 8044 3558 6136 4781 1765 4242 5433 9937 8768 5103 4470 1000 5480 4834 3372 88... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou've got a positive integer sequence a_1, a_2, ..., a_{n}. All numbers in the sequence are distinct. Let's ... | [{"input": "23\n26988535 53977070 107954140 161931210 323862420 215908280 431816560 647724840 269885350 242896815 755678980 485793630 863633120 404828025 539770700 134942675 593747770 377839490 917610190 809656050 620736305 971587260 458805095\n", "output": "7\n"}, {"input": "23\n26988535 53977070 107954140 161931210 3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFind the symmetric difference of two sets $A = \\\\{a_0, a_1, ..., a_{n-1}\\\\}$ and $B = \\\\{b_0, b_1, ...,... | [{"input": "7\n1 2 3 4 5 7 10\n2\n0 11 6 11", "output": "0\n1\n2\n3\n4\n5\n7\n10\n11\n"}, {"input": "7\n1 2 3 4 5 7 12\n1\n0 14 3 11", "output": "0\n1\n2\n3\n4\n5\n7\n12\n"}, {"input": "7\n1 2 3 4 5 7 10\n1\n0 11 6 11", "output": "0\n1\n2\n3\n4\n5\n7\n10\n"}, {"input": "7\n1 2 3 4 5 6 10\n3\n0 4 11 8", "output": "0\n1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe surveyor starship Hakodate-maru is famous for her two fuel containers with unbounded capacities. They hol... | [{"input": "100\n160\n50\n20\n150323\n0", "output": "99\n160\n47\n20\n150303\n"}, {"input": "100\n31\n37\n104\n151200\n0", "output": "99\n31\n37\n99\n151200\n"}, {"input": "100\n84\n50\n20\n151200\n0", "output": "99\n84\n47\n20\n151200\n"}, {"input": "100\n84\n50\n20\n150323\n0", "output": "99\n84\n47\n20\n150303\n"}, ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe ACM ICPC judges are very careful about not leaking their problems, and all communications are encrypted. ... | [{"input": "8\n1 1 1 1 1 1 2 1 8\n3 2 3 2 3 2 4 2 10\n6 4 7 13 7 b a 2 2e\ne1 13 ce 28 ca 6 ab 46 a5d\nb08 49e2 6128 f27 8cf2 bc50 7380 7fe1 722b\n4eba eb4 a352 fd14 6ac1 fed1 dd06 bb83 392bc\nef593c08 847e522f c9b20c47 26f3a4e1 e2720a01 6fe66007\n7a4e96ad 6ee5cef6 3853cd88\n8bf20206 757d6d66 9c3a9525 fbcd7983 82b9571c... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSnuke lives on an infinite two-dimensional plane. He is going on an N-day trip. At the beginning of Day 1, he... | [{"input": "NSNSNNSN", "output": "Yes\n"}, {"input": "NSSNSNNN", "output": "Yes\n"}, {"input": "NSNNSNSN", "output": "Yes"}, {"input": "SEWN", "output": "Yes\n"}, {"input": "ESWN", "output": "Yes\n"}, {"input": "WNES", "output": "Yes\n"}, {"input": "NEWS", "output": "Yes\n"}, {"input": "ENWS", "output": "Yes\n"}, {"inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe Little Elephant has got a problem — somebody has been touching his sorted by non-decreasing array a of le... | [{"input": "128\n1 2 4 6 8 17 20 20 23 33 43 49 49 49 52 73 74 75 82 84 85 87 90 91 102 103 104 105 111 111 401 142 142 152 155 160 175 176 178 181 183 184 187 188 191 193 326 202 202 214 224 225 236 239 240 243 246 247 249 249 257 257 261 264 265 271 277 281 284 284 286 289 290 296 297 303 305 307 307 317 318 320 322 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPetya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representat... | [{"input": "485 9554485\n7759121368632736852539182753173468028218114958118158732302477551670775608015153610483175626465946144780731573954182900412248382710280376491925985206156109890139333293746203940442347501294009600230166311978044218247083102712257326301109220002496805123344816427514286225153139924306380089284878322... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDraw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a c... | [{"input": "11 21\n10 0\n5 0\n2 4\n2 0\n0 0", "output": "#.#.#.#.#.#.#.#.#.#.#\n.#.#.#.#.#.#.#.#.#.#.\n#.#.#.#.#.#.#.#.#.#.#\n.#.#.#.#.#.#.#.#.#.#.\n#.#.#.#.#.#.#.#.#.#.#\n.#.#.#.#.#.#.#.#.#.#.\n#.#.#.#.#.#.#.#.#.#.#\n.#.#.#.#.#.#.#.#.#.#.\n#.#.#.#.#.#.#.#.#.#.#\n.#.#.#.#.#.#.#.#.#.#.\n#.#.#.#.#.#.#.#.#.#.#\n\n\n\n\n\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSo the Beautiful Regional Contest (BeRC) has come to an end! n students took part in the contest. The final s... | [{"input": "5\n12\n5 4 4 3 2 2 1 1 1 1 1 1\n4\n4 3 2 0\n1\n1000000\n20\n20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 10 3 2 1\n32\n64 64 63 58 58 58 58 58 37 37 37 37 34 34 28 28 28 28 28 28 24 24 19 17 17 17 17 16 17 16 16 11\n", "output": "1 2 3\n0 0 0\n0 0 0\n1 2 7\n2 6 6\n"}, {"input": "5\n12\n5 4 4 3 2 2 1 1 1 1 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIt's that time of the year when the Russians flood their countryside summer cottages (dachas) and the bus sto... | [{"input": "100 60\n34 21 39 17 48 46 23 56 46 52 50 39 55 48 54 38 32 38 24 26 44 12 28 9 25 26 10 52 42 60 41 3 16 60 44 29 27 55 19 19 19 57 45 59 29 35 5 14 50 47 57 48 16 7 12 36 58 31 37 58 30 50 19 11 10 41 59 57 49 41 33 9 12 11 53 50 60 51 21 9 44 23 1 16 4 15 17 57 15 17 46 50 18 52 43 24 47 50 19 18\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese and Russian. \n\nRecently Chef bought a bunch of robot-waiters.... | [{"input": "2\n-1 -1\n7 -1", "output": "2\n14\n"}, {"input": "2\n-1 -1\n2 11", "output": "2\n21\n"}, {"input": "2\n-1 -2\n4 14", "output": "3\n28\n"}, {"input": "2\n1 -1\n10 14", "output": "2\n28\n"}, {"input": "2\n2 -1\n10 14", "output": "5\n28\n"}, {"input": "2\n-1 0\n7 -1", "output": "3\n14\n"}, {"input": "2\n-1 -1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a directed acyclic graph with n vertices and m edges. There are no self-loops or multiple edges... | [{"input": "101 10\n73 41\n29 76\n11 8\n94 46\n77 67\n76 18\n72 50\n45 40\n89 75\n27 22\n", "output": "1 2 3 4 5 6 7 9 10 11 8 12 13 14 15 16 17 20 21 22 23 25 26 27 28 29 24 30 18 31 32 33 34 35 36 37 38 39 40 42 44 45 46 47 41 49 50 51 52 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 72 73 74 75 76 53 43 77 79 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn this Kata, we define an arithmetic progression as a series of integers in which the differences between ad... | [{"input": "[1, 1, 3, 5, 6, 5]", "output": "[4]", "fn_name": "solve"}, {"input": "[5, 4, 3, 2, 1, 1]", "output": "[1]", "fn_name": "solve"}, {"input": "[5, 6, 5, 3, 1, 1]", "output": "[4]", "fn_name": "solve"}, {"input": "[24, 21, 14, 10]", "output": "[3]", "fn_name": "solve"}, {"input": "[1, 3, 6, 9, 12]", "output": "... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVika has n jars with paints of distinct colors. All the jars are numbered from 1 to n and the i-th jar contai... | [{"input": "10\n896619242 805194919 1680710614 848347723 816995848 856813612 805194919 954097478 816255448 566613186\n", "output": "5666131869\n"}, {"input": "10\n896619242 805194919 1680710614 848347723 816995848 856813612 805194919 545821022 816255448 805194919\n", "output": "5458210229\n"}, {"input": "10\n896619242 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nInna and Dima decided to surprise Sereja. They brought a really huge candy matrix, it's big even for Sereja! ... | [{"input": "63 67 18046757 61758841 85367218 68\n22 30\n25 40\n56 58\n29 11\n34 63\n28 66\n51 5\n39 64\n1 23\n24 61\n19 47\n10 31\n55 28\n52 26\n38 7\n28 31\n13 27\n37 42\n10 52\n19 33\n7 36\n13 1\n46 40\n21 41\n1 1\n6 35\n10 4\n46 9\n21 57\n1 49\n34 14\n14 35\n43 4\n1 41\n25 22\n18 25\n27 23\n43 17\n34 23\n29 4\n50 40... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nShohag has an integer sequence $a_1, a_2, \\ldots, a_n$. He can perform the following operation any number of... | [{"input": "1\n39\n481199252 336470888 728039650 446497694 740396295 773386884 579721198 396628655 503722503 971207868 202647942 2087506 268792718 46761498 443917727 16843338 125908043 1772709198 717268783 787375312 150414369 693319712 519096230 29277141 856168102 762263554 674936674 407246545 274667941 279198849 52726... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a rectangle grid. That grid's size is n × m. Let's denote the coordinate system on the grid. So... | [{"input": "1000000000 1000001000 286536427 579261823 230782719 1150170645\n", "output": "209608854 195871608 363464000 962652038\n"}, {"input": "1000000000 1000000000 500000000 500000000 500000000 500000001\n", "output": "250000000 249999999 750000000 750000000\n"}, {"input": "1000000000 1000000000 286536427 579261823... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an array a_0, a_1, ..., a_{N-1} of length N. Process Q queries of the following types.\n\n* `0 ... | [{"input": "5 5\n1 2 9 4 5\n1 1 5\n1 2 4\n0 3 15\n1 0 5\n1 0 3", "output": "20\n13\n36\n12\n"}, {"input": "5 5\n1 2 8 4 5\n1 0 5\n1 2 4\n0 3 10\n1 0 5\n1 0 3", "output": "20\n12\n30\n11\n"}, {"input": "5 5\n1 2 8 4 5\n1 0 5\n1 2 4\n0 3 10\n1 0 4\n1 0 3", "output": "20\n12\n25\n11\n"}, {"input": "5 5\n1 0 4 0 5\n1 0 5\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn recreational mathematics, a [Keith number](https://en.wikipedia.org/wiki/Keith_number) or repfigit number ... | [{"input": "41796205765147426974704791528", "output": "[89]", "fn_name": "is_keith_number"}, {"input": "18354972585225358067718266", "output": "[78]", "fn_name": "is_keith_number"}, {"input": "855191324330802397989", "output": "[64]", "fn_name": "is_keith_number"}, {"input": "11812665388886672", "output": "[48]", "fn_n... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya's telephone contains n photos. Photo number 1 is currently opened on the phone. It is allowed to move l... | [{"input": "100 20 100 15061\nwwwwhhwhhwhhwhhhhhwwwhhhwwwhwwhwhhwwhhwwwhwwhwwwhwhwhwwhhhwwwhhwhwwhhwhwhwwwhwwwwhwhwwwwhwhhhwhwhwwh\n", "output": "100\n"}, {"input": "100 20 110 15061\nwwwwhhwhhwhhwhhhhhwwwhhhwwwhwwhwhhwwhhwwwhwwhwwwhwhwhwwhhhwwwhhwhwwhhwhwhwwwhwwwwhwhwwwwhwhhhwhwhwwh\n", "output": "100\n"}, {"input": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOne rainy gloomy evening when all modules hid in the nearby cafes to drink hot energetic cocktails, the Hexad... | [{"input": "010\n", "output": "0\n"}, {"input": "011\n", "output": "4\n"}, {"input": "001\n", "output": "0\n"}, {"input": "20\n", "output": "15\n"}, {"input": "15\n", "output": "4\n"}, {"input": "13\n", "output": "4\n"}, {"input": "11\n", "output": "4\n"}, {"input": "17\n", "output": "4\n"}, {"input": "18\n", "output":... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.