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\nTwo players, Red and Blue, are at it again, and this time they're playing with crayons! The mischievous duo i...
[{"input": "21 2\n1 2\n2 3\n2 4\n4 5\n10 6\n6 7\n13 8\n8 9\n1 10\n3 11\n11 12\n12 13\n3 15\n14 15\n20 16\n14 17\n14 18\n14 19\n14 20\n17 21\n", "output": "-70\n"}, {"input": "21 1\n1 2\n2 3\n2 4\n4 5\n10 6\n6 7\n14 8\n8 9\n9 10\n3 11\n11 12\n12 13\n5 14\n14 15\n14 16\n14 17\n14 18\n14 19\n14 20\n14 21\n", "output": "-9...
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 card pyramid of height $1$ is constructed by resting two cards against each other. For $h>1$, a card pyrami...
[{"input": "50\n11833308\n5211498\n64660\n9077929\n2699416\n2432035\n234901\n1337830\n8457191\n10523566\n5722429\n5452712\n5511654\n8587879\n348160\n3141182\n2661936\n395300\n6950223\n2119926\n4407089\n3559060\n10228325\n5752720\n1607500\n647047\n8904557\n1954681\n698061\n9852830\n1972893\n13760200\n5944868\n9527673\n2...
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\nWilliam arrived at a conference dedicated to cryptocurrencies. Networking, meeting new people, and using frie...
[{"input": "10 8\n1 2\n2 3\n3 4\n1 4\n6 7\n8 9\n8 10\n1 4\n", "output": "1\n2\n3\n4\n5\n5\n6\n8\n"}, {"input": "7 6\n1 2\n3 4\n2 4\n7 6\n6 5\n1 7\n", "output": "1\n1\n3\n3\n3\n6\n"}, {"input": "4 3\n2 1\n4 1\n1 2\n", "output": "1\n2\n3\n"}, {"input": "3 2\n1 3\n3 1\n", "output": "1\n2\n"}, {"input": "4 2\n2 4\n3 4\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# Task\n You are given two string `a` an `s`. Starting with an empty string we can do the following two opera...
[{"input": "\"abcdefgh\"\n\"hgfedcba\"", "output": "[64]", "fn_name": "string_constructing"}, {"input": "\"aba\"\n\"abbabba\"", "output": "[9]", "fn_name": "string_constructing"}, {"input": "\"aba\"\n\"abaa\"", "output": "[4]", "fn_name": "string_constructing"}, {"input": "\"aba\"\n\"a\"", "output": "[3]", "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\nOne day Alex was creating a contest about his friends, but accidentally deleted it. Fortunately, all the prob...
[{"input": "____________________________________________________________________________________________________\n", "output": "NO\n"}, {"input": "__________________________________________________________________________________________________`_\n", "output": "NO\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\nYou are given array $a_1, a_2, \\dots, a_n$. Find the subsegment $a_l, a_{l+1}, \\dots, a_r$ ($1 \\le l \\le ...
[{"input": "101\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\n", "output": "101\n"}, {"input": "101\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 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\nTwo pirates Polycarpus and Vasily play a very interesting game. They have n chests with coins, the chests are...
[{"input": "99\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 1000 1000 1000 1000 1000 1000 1000...
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 lessons Nastya decided to read a book. The book contains $n$ chapters, going one after another, so that...
[{"input": "49\n1 17\n18 115\n116 211\n212 269\n270 345\n346 404\n405 441\n442 467\n468 526\n527 583\n584 664\n665 757\n758 794\n795 802\n803 882\n883 920\n921 960\n961 962\n963 1006\n1007 1081\n1082 1112\n1113 1149\n1150 1217\n1218 1282\n1283 1287\n1288 1365\n1366 1374\n1375 1379\n1380 1478\n1479 1524\n1525 1549\n1550...
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 you have noticed, there are lovely girls in Arpa’s land.\n\nPeople in Arpa's land are numbered from 1 to n...
[{"input": "100\n84 94 72 32 61 90 61 2 76 42 35 82 90 29 51 27 65 99 38 41 44 73 100 58 56 64 54 31 14 58 57 64 90 49 73 80 74 19 31 86 73 44 39 43 28 95 23 5 85 5 74 81 34 44 86 30 50 57 94 56 53 42 53 87 92 78 53 49 78 60 37 63 41 19 15 68 25 77 87 48 23 100 54 27 68 84 43 92 76 55 2 94 100 20 92 18 76 83 100 99\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 electrical resistance is the opposition to the passage of electric current. If two resistors with resista...
[{"input": "3\n1 36\n2 16\n100 11111", "output": "1/1\n2/3\n10456/4100\n"}, {"input": "3\n1 20\n4 17\n100 10010", "output": "1/1\n13/4\n5501/5775\n"}, {"input": "3\n1 20\n4 17\n101 10010", "output": "1/1\n13/4\n1266/7041\n"}, {"input": "3\n1 10\n1 12\n100 10000", "output": "1/1\n1/1\n4301/9525\n"}, {"input": "3\n1 20\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\nAt the school where the twins Ami and Mami attend, the summer vacation has already begun, and a huge amount o...
[{"input": "4\n1 2\n3 1\n4 1\n2 1\n3\n10 4\n1 2\n1 2\n1\n1000 1000\n10\n5 62\n10 68\n15 132\n20 73\n25 75\n30 77\n35 79\n40 82\n45 100\n815 283\n6\n106 21\n53 55\n118 77\n19 13\n83 42\n2 1\n0", "output": "15\n24\n3000\n2072\n590\n"}, {"input": "4\n1 2\n3 1\n4 1\n2 2\n3\n10 4\n1 2\n1 2\n1\n1000 1000\n10\n5 62\n10 68\n15...
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\nSasha and Dima want to buy two $n$-tier cakes. Each cake should consist of $n$ different tiers: from the size...
[{"input": "10\n8 8 3 9 7 1 9 6 10 6 4 2 7 3 4 10 5 5 1 2\n", "output": "123\n"}, {"input": "10\n8 8 3 9 7 1 9 6 10 6 4 2 7 3 4 10 5 5 1 2\n", "output": "123\n"}, {"input": "9\n1 3 6 1 4 9 2 8 3 4 8 7 5 7 2 5 9 6\n", "output": "89\n"}, {"input": "9\n1 3 6 1 4 9 2 8 3 4 8 7 5 7 2 5 9 6\n", "output": "89\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\nEverything is great about Ilya's city, except the roads. The thing is, the only ZooVille road is represented ...
[{"input": "3 3 3\n1 2 1000000000\n2 3 1000000000\n1 1 1000000000\n", "output": "2000000000\n"}, {"input": "10 7 1\n3 5 15\n8 9 8\n5 6 8\n9 10 6\n1 4 2\n1 4 10\n8 10 13\n", "output": "2\n"}, {"input": "10 7 1\n3 5 15\n8 9 8\n4 6 8\n9 10 6\n1 4 2\n1 4 10\n8 10 13\n", "output": "2\n"}, {"input": "10 7 1\n3 5 15\n8 9 8\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\nExample\n\nInput\n\n2 2 2 0 0 0 5\n\n\nOutput\n\n1 3 3 1 0### Format: Read the inputs from stdin solve the pr...
[{"input": "2 2 4 1 0 1 35", "output": "1 4 6 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"}, {"input": "1 1 4 0 0 0 24", "output": "1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"}, {"input": "1 1 4 0 0 1 24", "output": "1 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"}, {"input": "1 2 4 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\nFafa owns a company that works on huge projects. There are n employees in Fafa's company. Whenever the compan...
[{"input": "100000\n", "output": "35\n"}, {"input": "83160\n", "output": "127\n"}, {"input": "127925\n", "output": "23\n"}, {"input": "99999\n", "output": "11\n"}, {"input": "65536\n", "output": "16\n"}, {"input": "40320\n", "output": "95\n"}, {"input": "30030\n", "output": "63\n"}, {"input": "10000\n", "output": "24\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\nA Madhav array has the following property:\n\n```a[0] = a[1] + a[2] = a[3] + a[4] + a[5] = a[6] + a[7] + a[8]...
[{"input": "[6, 2, 4, 2, 2, 2, 1, 5, 0, 0, -12, 13, -5, 4, 1]", "output": "[false]", "fn_name": "is_madhav_array"}, {"input": "[6, 2, 4, 2, 2, 2, 1, 5, 0, 0, -12, 13, -5, 4, 6]", "output": "[true]", "fn_name": "is_madhav_array"}, {"input": "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, -2, -1]", "output": "[true]", "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\nWe have N integers A_1, A_2, ..., A_N.\nThere are \\frac{N(N-1)}{2} ways to choose two of them and form a pai...
[{"input": "30 413\n-170202098 -268409015 537203564 983211703 11883920 -443999067 -286607651 -159124657 -358352725 526800997 -1907718835 648738515 -1273635706 -1268616353 37909651 -1 1196187672 -20098238 0 -948955241 1 -214720580 287839163 -18897162 694477644 0 -425610555 158912296 842295515 0", "output": "546429541592...
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 the easy version of the problem. The only difference is that in this version k = 0.\n\nThere is an ar...
[{"input": "2\n14 0\n1 16 1 81 1 36 1 1024 1 1000000 1 1048576 1 4194304\n14 0\n1 16 1 112 1 36 1 1024 1 1000000 1 1048576 1 4194304\n", "output": "14\n13\n"}, {"input": "2\n14 0\n2 16 1 81 1 36 1 1024 1 1000000 1 1048576 1 4194304\n14 0\n1 16 1 112 1 36 1 1024 1 1000000 1 1048576 1 4194304\n", "output": "13\n13\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\nAfter a long journey, the super-space-time immigrant ship carrying you finally discovered a planet that seems...
[{"input": "4 7\n4\nJIOJOIJ\nIJIOJOO\nJOIJOOI\nOOJJIJO\n5 7 0 7\n2 2 3 0\n2 3 2 2\n1 1 0 7", "output": "-1 -2 -1\n-1 0 -1\n0 0 0\n0 0 0\n"}, {"input": "4 7\n4\nJIOJOIJ\nIJIOJOO\nJOIJOOI\nOOJJIJO\n5 2 0 7\n2 2 2 0\n2 3 2 2\n1 1 0 7", "output": "-8 -10 -6\n0 0 -1\n0 0 0\n0 0 0\n"}, {"input": "4 7\n4\nJIOJOIJ\nOJIOJOI\nJO...
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## Check Digits\n\nSome numbers are more important to get right during data entry than others: a common examp...
[{"input": "\"9735597355\"", "output": "[\"97355973550\"]", "fn_name": "add_check_digit"}, {"input": "\"111111111\"", "output": "[\"1111111118\"]", "fn_name": "add_check_digit"}, {"input": "\"12388878\"", "output": "[\"123888782\"]", "fn_name": "add_check_digit"}, {"input": "\"036532\"", "output": "[\"0365327\"]", "fn_...
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\nGiven an integer x, find 2 integers a and b such that: \n\n * 1 ≤ a,b ≤ x \n * b divides a (a is divisible ...
[{"input": "100\n", "output": "11 11\n"}, {"input": "82\n", "output": "10 10\n"}, {"input": "92\n", "output": "10 10\n"}, {"input": "90\n", "output": "10 10\n"}, {"input": "86\n", "output": "10 10\n"}, {"input": "98\n", "output": "10 10\n"}, {"input": "87\n", "output": "10 10\n"}, {"input": "85\n", "output": "10 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\nYou have three tasks, all of which need to be completed.\nFirst, you can complete any one task at cost 0.\nTh...
[{"input": "100 100 000", "output": "100\n"}, {"input": "100 111 000", "output": "111\n"}, {"input": "100 111 001", "output": "110\n"}, {"input": "100 111 010", "output": "101\n"}, {"input": "110 001 010", "output": "109\n"}, {"input": "100 000 000", "output": "100\n"}, {"input": "100 100 100\n", "output": "0\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\nJoisino is working as a receptionist at a theater.\nThe theater has 100000 seats, numbered from 1 to 100000.\...
[{"input": "2\n151 -2\n0 4", "output": "-147\n"}, {"input": "2\n276 -2\n0 4", "output": "-272\n"}, {"input": "2\n276 -1\n0 4", "output": "-271\n"}, {"input": "2\n276 -1\n0 7", "output": "-268\n"}, {"input": "2\n276 -2\n0 7", "output": "-269\n"}, {"input": "2\n331 -1\n0 7", "output": "-323\n"}, {"input": "2\n331 -1\n0 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\n`late_clock` function receive an array with 4 digits and should return the latest time that can be built with...
[{"input": "[9, 1, 2, 5]", "output": "[\"21:59\"]", "fn_name": "late_clock"}, {"input": "[1, 9, 8, 3]", "output": "[\"19:38\"]", "fn_name": "late_clock"}, {"input": "[0, 2, 2, 2]", "output": "[\"22:20\"]", "fn_name": "late_clock"}, {"input": "[3, 5, 0, 2]", "output": "[\"23:50\"]", "fn_name": "late_clock"}, {"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\nThere is a beautiful garden of stones in Innopolis.\n\nIts most beautiful place is the $n$ piles with stones ...
[{"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\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 100...
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 stones arranged in a row. The i-th stone from the left is painted in the color C_i.\n\nSnuke will...
[{"input": "7\n1\n2\n10\n2\n1\n6\n2", "output": "5\n"}, {"input": "7\n1\n2\n1\n2\n3\n3\n2", "output": "6\n"}, {"input": "7\n1\n3\n1\n2\n1\n3\n2", "output": "7\n"}, {"input": "7\n1\n3\n1\n2\n4\n3\n2", "output": "5\n"}, {"input": "7\n1\n3\n1\n2\n2\n3\n2", "output": "5\n"}, {"input": "7\n1\n2\n2\n2\n3\n3\n2", "output": "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\nEugeny has array a = a_1, a_2, ..., a_{n}, consisting of n integers. Each integer a_{i} equals to -1, or to 1...
[{"input": "10 10\n-1 1 -1 1 -1 -1 -1 -1 -1 -1\n6 10\n4 5\n3 6\n2 3\n3 5\n4 5\n3 4\n1 7\n1 1\n1 1\n", "output": "0\n1\n1\n1\n0\n1\n1\n0\n0\n0\n"}, {"input": "10 10\n-1 1 -1 1 -1 -1 -1 -1 -1 -1\n6 13\n4 5\n3 6\n2 3\n0 5\n4 5\n3 4\n1 4\n1 1\n1 1\n", "output": "0\n1\n1\n1\n0\n1\n1\n1\n0\n0\n"}, {"input": "10 10\n-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\nAfter winning gold and silver in IOI 2014, Akshat and Malvika want to have some fun. Now they are playing a g...
[{"input": "100 100\n", "output": "Malvika\n"}, {"input": "100 100\n", "output": "Malvika\n"}, {"input": "98 100\n", "output": "Malvika\n"}, {"input": "100 98\n", "output": "Malvika\n"}, {"input": "98 100\n", "output": "Malvika\n"}, {"input": "100 98\n", "output": "Malvika\n"}, {"input": "28 100\n", "output": "Malvika\...
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 Russian also. \nChef plays with the sequence of N numbers. During a single move C...
[{"input": "4\n20 -1 -2 -4", "output": "4\n"}, {"input": "4\n0 -2 6 10", "output": "2\n"}, {"input": "4\n1 -2 6 10", "output": "2\n"}, {"input": "4\n2 -2 6 10", "output": "2\n"}, {"input": "4\n4 -2 6 10", "output": "2\n"}, {"input": "4\n2 -1 6 10", "output": "2\n"}, {"input": "4\n0 -1 6 10", "output": "2\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\nYour friend recently gave you some slimes for your birthday. You have n slimes all initially with value 1.\n\...
[{"input": "128982\n", "output": "17 16 15 14 13 11 10 9 8 7 5 3 2\n"}, {"input": "97205\n", "output": "17 15 14 13 12 10 9 8 6 5 3 1 \n"}, {"input": "97205\n", "output": "17 15 14 13 12 10 9 8 6 5 3 1\n"}, {"input": "32698\n", "output": "15 14 13 12 11 10 9 8 6 5 4 2\n"}, {"input": "97260\n", "output": "17 15 14 13 12...
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 average miner Vaganych took refresher courses. As soon as a miner completes the courses, he should take e...
[{"input": "50\n515844718 503470143 928669067 209884122 322869098 241621928 844696197 105586164 552680307 968792756 135928721 842094825 298782438 829020472 791637138 285482545 811025527 428952878 887796419 11883658 546401594 6272027 100292274 308219869 372132044 955814846 644008184 521195760 919389466 215065725 6877641...
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 $n$ strings $s_1, s_2, \\ldots, s_n$ consisting of lowercase Latin letters.\n\nIn one operation...
[{"input": "4\n2\ncaa\ncbb\n3\ncba\ncba\ncbb\n4\nccab\ncbac\nbca\nacbcc\n4\nacb\ncaf\nc\ncbafc\n", "output": "YES\nNO\nYES\nNO\n"}, {"input": "4\n2\ncaa\ncbb\n3\ncba\ncba\ncbb\n4\nccab\ncbac\nbca\nacbcc\n4\nacb\ncaf\nc\ncbafc\n", "output": "YES\nNO\nYES\nNO\n"}, {"input": "1\n26\na\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\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\nNaman has two binary strings $s$ and $t$ of length $n$ (a binary string is a string which only consists of th...
[{"input": "12\n011001010101\n111001010101\n", "output": "-1\n"}, {"input": "12\n011101010101\n101001010101\n", "output": "-1\n"}, {"input": "12\n011001010101\n111001010101\n", "output": "-1"}, {"input": "12\n011101010101\n111001010101\n", "output": "1\n"}, {"input": "10\n1010011110\n1011101101\n", "output": "-1\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\nLeha is planning his journey from Moscow to Saratov. He hates trains, so he has decided to get from one city ...
[{"input": "100\n3 3 3 4 7 8 8 8 9 9 10 12 12 13 14 14 15 15 16 17 17 20 21 21 22 22 23 25 29 31 36 37 37 38 39 40 41 41 41 42 43 44 45 46 46 47 47 49 49 49 51 52 52 53 54 55 59 59 59 60 62 63 63 64 66 69 70 71 71 72 74 76 76 77 77 78 78 79 80 81 81 82 82 84 85 86 87 87 87 89 91 92 92 92 92 97 98 99 100 100\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\nTwo friends are on the coordinate axis Ox in points with integer coordinates. One of them is in the point x_1...
[{"input": "864\n179\n", "output": "117649\n"}, {"input": "967\n102\n", "output": "187489\n"}, {"input": "967\n142\n", "output": "170569\n"}, {"input": "967\n282\n", "output": "117649\n"}, {"input": "944\n193\n", "output": "141376\n"}, {"input": "1\n1000\n", "output": "250000\n"}, {"input": "1000\n1\n", "output": "2500...
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\nGiven are integer sequence of length N, A = (A_1, A_2, \\cdots, A_N), and an integer K.\nFor each X such that...
[{"input": "192 275\n426 445 272 81 447 129 497 202 275 325 482 284 417 156 432 402 228 37 357 239 418 211 179 6 340 68 368 16 440 263 93 449 491 310 355 68 431 80 257 218 434 328 176 355 221 80 422 45 11 67 467 174 191 4 335 34 465 480 221 395 1 152 325 231 302 153 396 22 489 399 107 466 432 2 468 333 475 292 84 10 19...
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 problem statement looms below, filling you with determination.\n\nConsider a grid in which some cells are...
[{"input": "3 3\nXX.\n...\n.XX\n10\n1 3\n1 3\n1 2\n1 2\n3 3\n1 3\n2 3\n3 3\n2 3\n2 2\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\n"}, {"input": "3 3\n..X\nX.X\n..X\n10\n2 3\n2 2\n3 3\n1 3\n1 1\n3 3\n3 3\n1 1\n1 2\n1 1\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\n"}, {"input": "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\nThere are $n$ beautiful skyscrapers in New York, the height of the $i$-th one is $h_i$. Today some villains h...
[{"input": "8\n7 2 5 5 1 2 5 2\n", "output": "4\n"}, {"input": "8\n7 2 5 5 1 2 2 2\n", "output": "5\n"}, {"input": "8\n7 2 5 5 2 2 5 2\n", "output": "4\n"}, {"input": "8\n4 3 5 5 1 2 5 2\n", "output": "4\n"}, {"input": "5\n110 1 100 1 100\n", "output": "2\n"}, {"input": "8\n7 2 5 5 3 2 5 2\n", "output": "3\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\nMishka is a little polar bear. As known, little bears loves spending their free time playing dice for chocola...
[{"input": "100\n4 3\n3 4\n5 1\n2 5\n5 3\n1 5\n6 3\n2 4\n5 2\n2 6\n5 2\n1 5\n6 3\n1 5\n6 3\n3 4\n5 2\n1 5\n6 1\n1 5\n4 2\n3 5\n6 3\n2 6\n6 3\n1 4\n6 2\n3 4\n4 1\n3 6\n5 1\n2 4\n5 1\n3 4\n6 2\n3 5\n4 1\n2 6\n4 3\n2 6\n5 2\n3 6\n6 2\n3 5\n4 3\n1 5\n5 3\n3 6\n4 2\n3 4\n6 1\n3 4\n5 2\n2 6\n5 2\n2 4\n6 2\n3 6\n4 3\n2 4\n4 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\nKuro has just learned about permutations and he is really excited to create a new permutation type. He has ch...
[{"input": "69\n1034 414 632 614 62 855 915 385 1098 8 462 1750 1227 960 450 25 1307 578 37 262 482 1143 844 696 1004 1008 70 1137 509 1217 561 557 192 513 792 794 1335 1201 1290 543 698 55 119 536 1088 162 1074 676 246 457 662 595 1054 1252 778 165 703 1222 326 158 145 272 729 381 1087 1261 717 113 73\n", "output": "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\nThe Kingdom of Kremland is a tree (a connected undirected graph without cycles) consisting of $n$ vertices. E...
[{"input": "44\n42 44 4 24 29 17 32 30 30 9 28 9 22 16 20 41 17 19 41 23 28 19 38 44 1 34 41 34 19 36 32 37 22 31 4 3 27 23 21 21 26 39 20 8\n", "output": "6926\n"}, {"input": "44\n42 44 4 24 29 17 32 30 30 9 28 9 22 16 20 41 17 19 41 23 28 19 38 44 1 34 41 34 19 36 32 37 22 31 4 3 27 23 21 21 26 39 20 8\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\nIn 40XX, the Earth was invaded by aliens! Already most of the Earth has been dominated by aliens, leaving Tsu...
[{"input": "110 5\n111 101 5 5\n110 110 2 3\n-112 -100 5 11\n-208 160 109 90\n-110 159 10 3\n26 11\n15 -1 5 2\n25 0 5 1\n35 0 5 1\n118 0 5 1\n55 0 5 1\n65 0 5 1\n149 -1 5 1\n169 0 1 1\n90 0 5 1\n-19 -1 5 20\n-30 0 500 5\n0 0", "output": "1\n4\n"}, {"input": "100 5\n111 101 5 5\n110 110 2 3\n-112 -100 5 11\n-208 160 109...
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 points on a straight line, and the i-th point among them is located at x_{i}. All these coordinat...
[{"input": "10\n711183437 845779129 -106125616 -481773790 66231250 -183390793 -711197523 -196001897 -440633306 -873649505\n", "output": "156311685\n"}, {"input": "10\n711183437 845779129 -106125616 -481773790 66231250 -183390793 -711197523 -196001897 -440633306 -873649505\n", "output": "156311685\n"}, {"input": "7\n996...
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\nYour task is to return the number of visible dots on a die after it has been rolled(that means the total coun...
[{"input": "19\n20", "output": "[208]", "fn_name": "totalAmountVisible"}, {"input": "15\n20", "output": "[204]", "fn_name": "totalAmountVisible"}, {"input": "6\n20", "output": "[195]", "fn_name": "totalAmountVisible"}, {"input": "8\n20", "output": "[197]", "fn_name": "totalAmountVisible"}, {"input": "12\n12", "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\nThere are N towns numbered 1 to N and M roads. The i-th road connects Town A_i and Town B_i bidirectionally a...
[{"input": "5 4 0\n1 2 2\n3 5 2\n3 4 3\n4 5 2\n20\n2 1\n3 1\n3 1\n5 1\n1 2\n3 2\n4 2\n5 2\n1 3\n2 3\n4 3\n5 3\n1 4\n2 4\n3 4\n5 4\n1 5\n2 5\n3 5\n4 5", "output": "-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n-1\n"}, {"input": "5 4 1\n1 2 2\n3 2 2\n3 4 1\n4 5 3\n20\n2 1\n3 1\n3 1\n5 1\n1 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\nWrite a program that, given a word, computes the scrabble score for that word.\n\n## Letter Values\n\nYou'll ...
[{"input": "\"MULTIBILLIONAIRE\"", "output": "[20]", "fn_name": "scrabble_score"}, {"input": "\"alacrity\"", "output": "[13]", "fn_name": "scrabble_score"}, {"input": "\"st re et\"", "output": "[6]", "fn_name": "scrabble_score"}, {"input": "\"quirky\"", "output": "[22]", "fn_name": "scrabble_score"}, {"input": "\"stree...
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\nThere are n Imperial stormtroopers on the field. The battle field is a plane with Cartesian coordinate system...
[{"input": "10 -4 -4\n2 -4\n2 0\n-4 2\n5 -4\n-3 -5\n1 4\n-4 2\n-3 5\n0 -3\n2 4\n", "output": "8\n"}, {"input": "10 -4 -4\n2 -4\n2 0\n-4 2\n5 -4\n-3 -5\n1 4\n-4 2\n-3 5\n0 -3\n2 4\n", "output": "8\n"}, {"input": "10 -4 -4\n1 -4\n2 0\n-4 2\n5 -4\n-3 -5\n1 4\n-4 2\n-3 5\n0 -3\n2 4\n", "output": "8\n"}, {"input": "10 -4 -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\nHanh lives in a shared apartment. There are $n$ people (including Hanh) living there, each has a private frid...
[{"input": "10\n10 10\n8 9 2 10 3 8 10 9 1 10\n10 10\n3 10 3 13 12 14 3 3 4 4\n10 5\n7 13 10 14 5 12 5 5 7 11\n10 10\n12 13 3 6 12 9 6 6 5 7\n10 10\n4 10 15 13 13 15 9 8 8 14\n10 10\n2 3 8 5 9 7 11 12 7 9\n10 10\n12 15 11 10 1 8 10 3 4 2\n10 5\n8 11 7 14 7 9 5 2 8 9\n10 10\n4 9 9 9 10 4 1 12 13 15\n10 10\n12 2 7 5 15 8...
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\nWhile Farmer John rebuilds his farm in an unfamiliar portion of Bovinia, Bessie is out trying some alternativ...
[{"input": "13 78\n10 2\n6 5\n5 7\n10 3\n6 13\n4 7\n4 13\n1 12\n13 2\n1 7\n10 5\n10 13\n12 2\n10 6\n5 3\n10 8\n9 11\n6 1\n4 5\n12 3\n6 7\n8 2\n1 9\n4 11\n5 8\n6 3\n9 5\n5 2\n13 11\n10 4\n12 7\n5 13\n12 8\n10 12\n6 12\n5 11\n1 8\n7 8\n12 4\n10 7\n1 5\n1 2\n10 11\n2 11\n12 13\n9 7\n8 3\n12 9\n9 2\n6 9\n10 9\n7 11\n12 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\nIt is September 9 in Japan now.\nYou are given a two-digit integer N. Answer the question: Is 9 contained in ...
[{"input": "29\n", "output": "Yes\n"}, {"input": "91\n", "output": "Yes\n"}, {"input": "929", "output": "Yes\n"}, {"input": "109", "output": "Yes\n"}, {"input": "189", "output": "Yes\n"}, {"input": "1223", "output": "No\n"}, {"input": "72\n", "output": "No\n"}, {"input": "69", "output": "Yes\n"}, {"input": "115", "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\nYou are given two binary strings $a$ and $b$ of the same length. You can perform the following two operations...
[{"input": "91\n0010010000110001001011011011111001000110001000100111110010010001100110010111100111011111100\n1101110110000100110000100011010110111101100000011011100111111000110000001101101111100100101\n", "output": "43\n"}, {"input": "91\n001001000011000100101101101111100100011000100010011111001001000110011001011110011...
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\nCompanies always have a lot of equipment, furniture and other things. All of them should be tracked. To do th...
[{"input": "111\n15 45 14 65 49 25 102 86 14 80 54 73 43 78 42 32 47 60 55 66 84 69 49 22 26 72 89 52 26 80 71 35 56 2 88 23 23 53 65 92 46 73 29 65 88 99 19 99 87 10 47 96 109 20 60 89 63 105 29 92 109 20 95 65 31 89 107 3 3 50 58 9 28 39 104 42 41 36 70 49 59 96 16 9 3 108 38 42 2 67 32 86 20 6 101 70 101 91 38 10 74...
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\nSantosh has a farm at Byteland. He has a very big family to look after. His life takes a sudden turn and he ...
[{"input": "2\n15 28\n13 1", "output": "420\n13\n"}, {"input": "2\n11 28\n13 1", "output": "308\n13\n"}, {"input": "2\n11 28\n12 1", "output": "308\n12\n"}, {"input": "2\n11 51\n12 1", "output": "561\n12\n"}, {"input": "2\n18 51\n12 1", "output": "102\n12\n"}, {"input": "2\n18 55\n12 1", "output": "990\n12\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\nSheldon, Leonard, Penny, Rajesh and Howard are in the queue for a \"Double Cola\" drink vending machine; ther...
[{"input": "0000011000\n", "output": "Sheldon\n"}, {"input": "381237714\n", "output": "Sheldon\n"}, {"input": "872651351\n", "output": "Leonard\n"}, {"input": "347025213\n", "output": "Sheldon\n"}, {"input": "425568842\n", "output": "Leonard\n"}, {"input": "758393876\n", "output": "Sheldon\n"}, {"input": "215431553\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\nAlperen has two strings, $s$ and $t$ which are both initially equal to \"a\".\n\nHe will perform $q$ operatio...
[{"input": "3\n5\n2 1 aa\n1 2 a\n2 3 a\n1 2 b\n2 3 abca\n2\n1 5 mihai\n2 2 buiucani\n3\n1 5 b\n2 3 a\n2 4 paiu\n", "output": "YES\nNO\nYES\nNO\nYES\nNO\nYES\nNO\nNO\nYES\n"}, {"input": "1\n8\n2 7 z\n1 2 xpt\n2 5 aosu\n2 3 veel\n1 3 dnx\n1 8 tgly\n2 5 rqlmvchcir\n1 10 qklu\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nYE...
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 two arrays A and B consisting of integers, sorted in non-decreasing order. Check whether it is ...
[{"input": "20 30\n19 29\n2 1 2 2 3 3 4 4 7 7 7 9 8 8 8 8 1 0 9 10\n6 9 9 7 9 9 9 9 5 9 9 9 9 18 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10\n", "output": "NO\n"}, {"input": "20 30\n19 29\n2 1 2 2 2 3 4 4 7 10 7 8 8 8 8 8 9 9 9 9\n6 9 9 9 9 9 9 9 9 9 9 9 9 18 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10\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\nThere are N children standing in a line from left to right. The activeness of the i-th child from the left is...
[{"input": "2000\n919697266 557620328 306200382 938985256 815342630 163392675 302065984 171634774 595091891 878051152 45556321 599365418 836259090 519017787 53355189 239963918 892242532 41911517 32213197 241306129 182967761 735538395 277915827 947333936 397686688 951038946 390763995 565454633 980862050 263983172 856918...
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 binary search tree can be unbalanced depending on features of data. For example, if we insert $n$ elements ...
[{"input": "16\ninsert 21 99\ninsert 3 80\ninsert 1 12\ninsert 14 25\ninsert 80 76\ninsert 42 3\ninsert 141 47\ninsert 26 6\ninsert 12 10\ninsert 6 139\nprint\nfind 21\nfind 22\ndelete 35\ndelete 99\nprint", "output": " 1 3 6 12 14 21 26 42 80 141\n 6 3 1 21 14 12 80 26 42 141\nyes\nno\n 1 3 6 12 14 21 26 42 80 141\n 6...
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 common way of digitalizing sound is to record sound intensity at particular time moments. For each time m...
[{"input": "50 20\n592183311 362557946 154127088 616872926 395353745 675069471 509655682 79915471 356656666 937992998 304422065 724106263 472338455 792258113 796069631 1325917135 201799298 566151622 722278085 827802227 703159587 690854023 925377265 11010958 69791159 990158269 535460930 167415727 999216963 237203826 693...
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 squares aligned in a row. The i-th square from the left contains an integer a_i.\n\nInitially, al...
[{"input": "10 5\n5 -4 -5 -16 -4 0 2 -4 -1 3", "output": "10\n"}, {"input": "10 5\n6 -4 -5 -16 -4 0 2 -4 -1 3", "output": "11\n"}, {"input": "10 5\n6 -4 -5 -16 -4 0 2 -4 -2 3", "output": "11\n"}, {"input": "10 5\n5 -4 -5 -8 -4 7 2 -4 0 14", "output": "24\n"}, {"input": "10 5\n5 -4 -5 -16 -4 0 1 -4 -1 3", "output": "9\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\nOne common way of digitalizing sound is to record sound intensity at particular time moments. For each time m...
[{"input": "50 20\n592183311 362557946 154127088 616872926 395353745 675069471 509655682 79915471 356656666 937992998 304422065 724106263 472338455 792258113 796069631 663370025 201799298 566151622 722278085 508905399 703159587 690854023 925377265 11010958 69791159 990158269 535460930 167415727 999216963 237203826 6939...
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 integers 14 and 15, are contiguous (1 the difference between them, obvious) and have the same number of d...
[{"input": "11\n5000", "output": "[567]", "fn_name": "count_pairs_int"}, {"input": "6\n1000", "output": "[214]", "fn_name": "count_pairs_int"}, {"input": "7\n1500", "output": "[189]", "fn_name": "count_pairs_int"}, {"input": "7\n2500", "output": "[309]", "fn_name": "count_pairs_int"}, {"input": "7\n3000", "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\nThere is a graph of $n$ rows and $10^6 + 2$ columns, where rows are numbered from $1$ to $n$ and columns from...
[{"input": "4\n2 3 1\n999999 1000000\n2 3 2\n999999 1000000\n2 3 1\n1000000 1584412\n2 3 1\n100 1000000\n", "output": "1\n2\n0\n0\n"}, {"input": "4\n2 3 1\n285716 1000000\n2 3 2\n999999 1000000\n2 3 1\n1000000 1584412\n2 3 1\n100 1000000\n", "output": "0\n2\n0\n0\n"}, {"input": "4\n2 3 1\n999999 1000000\n2 3 2\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\nSome large corporation where Polycarpus works has its own short message service center (SMSC). The center's t...
[{"input": "40\n313 97063\n372 23668\n377 56079\n428 88458\n435 57330\n454 88869\n456 75553\n466 87607\n468 4542\n469 30243\n471 8958\n472 59745\n473 90985\n474 32247\n475 71576\n476 14016\n477 91574\n478 38345\n479 93280\n480 89902\n481 41828\n482 3233\n483 66725\n484 23523\n485 46772\n486 95688\n487 19864\n488 10295\...
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 denote a function \n\n$d(x, y) = \\left\\{\\begin{array}{ll}{y - x,} & {\\text{if}|x - y|> 1} \\\\{0,} ...
[{"input": "100\n591 417 888 251 792 847 685 3 182 461 102 348 555 956 771 901 712 878 580 631 342 333 285 899 525 725 537 718 929 653 84 788 104 355 624 803 253 853 201 995 536 184 65 205 540 652 549 777 248 405 677 950 431 580 600 846 328 429 134 983 526 103 500 963 400 23 276 704 570 757 410 658 507 620 984 244 486 ...
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 Berland University is preparing to celebrate the 256-th anniversary of its founding! A specially appointe...
[{"input": "97\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "-1\n"}, {"input": "97\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -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\nIahub got bored, so he invented a game to be played on paper. \n\nHe writes n integers a_1, a_2, ..., a_{n}. ...
[{"input": "100\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "100\n"}, {"input": "100\n0 1 0 1 1 1 0 1 0 1 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 1 1 1 0 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\nTakahashi is drawing a segment on grid paper.\n\nFrom a certain square, a square that is x squares to the rig...
[{"input": "124 -2 -1 -1", "output": "125\n"}, {"input": "241 -2 -1 -1", "output": "242\n"}, {"input": "121 -1 -1 0", "output": "122\n"}, {"input": "116 1 -2 -1", "output": "118\n"}, {"input": "209 -1 -1 0", "output": "210\n"}, {"input": "116 1 -2 -2", "output": "120\n"}, {"input": "124 1 1 -2", "output": "123\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\nIn genetics a reading frame is a way to divide a sequence of nucleotides (DNA bases) into a set of consecutiv...
[{"input": "\"AGGTGACACCGCAAGCCTTATATTAGC\"", "output": "[[\"R*HRKPYIS\", \"GDTASLIL\", \"VTPQALY*\", \"ANIRLAVSP\", \"LI*GLRCH\", \"*YKACGVT\"]]", "fn_name": "translate_with_frame"}, {"input": "\"AGGTGACACCGCAAGCCTTATATTAGC\"\n[1, 2]", "output": "[[\"R*HRKPYIS\", \"GDTASLIL\"]]", "fn_name": "translate_with_frame"}, {"...
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\nPetya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representat...
[{"input": "00000000000000000000000000000000000000000000000000\n", "output": "-1\n"}, {"input": "110996812575168252737244204200508745829735318381381\n", "output": "7\n"}, {"input": "122094830270541438292052920866473330280784608392695\n", "output": "4\n"}, {"input": "00000000000000000000000000000100000000000000000000\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\nThere are $n$ students in a university. The number of students is even. The $i$-th student has programming sk...
[{"input": "100\n1 1 100 100 1 100 1 1 1 1 1 1 100 1 100 100 100 1 1 100 100 100 100 100 1 100 1 100 1 1 1 100 1 1 100 1 100 1 1 1 100 100 1 1 1 100 100 100 100 100 1 100 100 1 1 1 1 100 1 1 100 1 1 1 1 100 100 100 1 100 1 100 100 100 1 1 100 100 100 100 1 100 1 100 100 1 100 1 100 100 100 100 100 100 1 1 1 100 100 1\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\nInaka has a disc, the circumference of which is $n$ units. The circumference is equally divided by $n$ points...
[{"input": "30000 28\n10601 1119\n11119 20601\n9493 25771\n14351 4869\n13101 3619\n23101 13619\n29869 9351\n6119 15601\n3101 23619\n1851 22369\n11851 2369\n8619 18101\n19579 20882\n18619 28101\n16851 7369\n8101 28619\n24869 4351\n24351 14869\n27369 6851\n9869 19351\n5601 26119\n3976 21301\n21851 12369\n25601 16119\n244...
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 got a box with a combination lock. The lock has a display showing n digits. There are two buttons on the ...
[{"input": "200\n79025531557298703099245700860027432585447902553155729870309924570086002743258544790255315572987030992457008600274325854479025531557298703099245700860027432585447902553155729870309924570086002743258544\n", "output": "002743258544790255315572987030992457008600274325854479025531557298703099245700860027432...
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 histogram is made of a number of contiguous bars, which have same width.\n\nFor a given histogram with $N$ ...
[{"input": "8\n1 20 9 13 4 10 1 26", "output": "27\n"}, {"input": "8\n1 36 9 13 4 10 1 26", "output": "36\n"}, {"input": "8\n1 36 9 13 4 10 1 38", "output": "38\n"}, {"input": "8\n1 20 3 13 4 7 1 26", "output": "26\n"}, {"input": "8\n5 13 10 10 1 2 0 2", "output": "30\n"}, {"input": "8\n5 13 15 19 0 2 0 2", "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\nKitahara Haruki has bought n apples for Touma Kazusa and Ogiso Setsuna. Now he wants to divide all the apples...
[{"input": "100\n200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200...
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# Introduction \n\nDigital Cypher assigns a unique number to each letter of the alphabet:\n\n```\n a b c d...
[{"input": "\"notencrypted\"\n[14, 15, 20, 5, 14, 3, 18, 25, 16, 20, 5, 4]", "output": "[0]", "fn_name": "find_the_key"}, {"input": "\"masterpiece\"\n[14, 10, 22, 29, 6, 27, 19, 18, 6, 12, 8]", "output": "[1939]", "fn_name": "find_the_key"}, {"input": "\"tenthousand\"\n[21, 5, 14, 20, 8, 16, 21, 19, 1, 14, 5]", "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\nThere are n walruses sitting in a circle. All of them are numbered in the clockwise order: the walrus number ...
[{"input": "32 10540\n", "output": "12\n"}, {"input": "84 10000\n", "output": "10\n"}, {"input": "37 25195\n", "output": "29\n"}, {"input": "123 1008\n", "output": "18\n"}, {"input": "75 10000\n", "output": "19\n"}, {"input": "26 10010\n", "output": "11\n"}, {"input": "50 10000\n", "output": "40"}, {"input": "57 6218\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\nProblem statement\n\nCards with ranks of $ 2 $ and $ 8 $ are powerful in card game millionaires. Therefore, w...
[{"input": "-104", "output": "-1\n"}, {"input": "-102", "output": "-1\n"}, {"input": "-118", "output": "-1\n"}, {"input": "-114", "output": "-1\n"}, {"input": "-206", "output": "-1\n"}, {"input": "-168", "output": "-1\n"}, {"input": "-101", "output": "-1\n"}, {"input": "-109", "output": "-1\n"}, {"input": "-106", "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\nGiven an array $A_1, A_2, ..., A_N$, count the number of subarrays of array $A$ which are non-decreasing.\n\n...
[{"input": "2\n4\n-1 1 2 2\n1\n4", "output": "10\n1\n"}, {"input": "2\n4\n1 2 2 3\n1\n5", "output": "10\n1\n"}, {"input": "2\n4\n1 2 2 3\n1\n2", "output": "10\n1\n"}, {"input": "2\n4\n2 13 0 2\n1\n4", "output": "6\n1\n"}, {"input": "2\n4\n2 2 2 3\n1\n2", "output": "10\n1\n"}, {"input": "2\n4\n0 1 2 2\n1\n4", "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\nMonocarp is playing a game \"Assimilation IV\". In this game he manages a great empire: builds cities and con...
[{"input": "3 5\n1 4 4 3 4\n1 4 1 4 2\n1 4 4 4 3\n", "output": "\n166374062\n"}, {"input": "3 5\n1 4 4 3 4\n1 4 1 4 2\n1 4 4 4 3\n", "output": "166374062\n"}, {"input": "3 5\n1 4 4 3 4\n1 4 2 4 2\n1 4 4 4 3\n", "output": "831870297\n"}, {"input": "3 5\n1 4 4 3 4\n1 4 2 4 2\n1 3 4 4 3\n", "output": "166374062\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\nYou are given two set of points. The first set is determined by the equation A1x + B1y + C1 = 0, and the seco...
[{"input": "100 100 100\n-100 100 -100\n", "output": "1"}, {"input": "12 -32 89\n0 67 -23\n", "output": "1"}, {"input": "-1 1 -1\n-1 1 -1\n", "output": "-1\n"}, {"input": "0 -1 -1\n-1 -1 -1\n", "output": "1\n"}, {"input": "-1 -1 0\n-1 -1 -1\n", "output": "0\n"}, {"input": "0 -1 -1\n-2 -1 -1\n", "output": "1\n"}, {"inpu...
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 legendary Farmer John is throwing a huge party, and animals from all over the world are hanging out at hi...
[{"input": "100000 12\n8 11\n1 9\n5 4\n11 12\n7 11\n3 4\n6 5\n12 15\n15 13\n13 14\n7 11\n11 14\n", "output": "2\n"}, {"input": "100000 12\n8 10\n1 9\n5 4\n11 12\n7 11\n3 4\n3 5\n12 15\n15 13\n13 14\n7 8\n11 14\n", "output": "2\n"}, {"input": "100000 12\n8 11\n1 9\n5 4\n11 12\n7 11\n3 4\n3 5\n12 15\n15 13\n13 14\n7 8\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\nproblem\n\nAOR Ika is at the $ S $ th bus stop at time $ 0 $ and wants to go from there to the $ G $ th bus s...
[{"input": "2 2 1 2\n1 2 16 110\n2 2 7 1526", "output": "16\n"}, {"input": "2 1 1 2\n1 2 12 100\n1 -1 5 500", "output": "12\n"}, {"input": "2 2 1 2\n1 2 19 110\n2 2 7 1526", "output": "19\n"}, {"input": "2 2 1 2\n1 2 19 010\n2 2 7 1526", "output": "19\n"}, {"input": "2 2 1 2\n1 2 19 110\n2 2 3 1526", "output": "19\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\nA fraction whose numerator is 1 and whose denominator is a positive integer is called a unit fraction. A repr...
[{"input": "2 3 120 3\n2 3 300 3\n2 3 299 3\n2 3 12 3\n2 3 12000 7\n54 1343 12000 7\n2 3 300 1\n2 1 200 5\n2 4 54 2\n0 0 0 0", "output": "4\n7\n6\n2\n42\n0\n0\n9\n3\n"}, {"input": "2 3 120 3\n2 3 300 3\n2 3 299 3\n2 3 12 3\n2 3 12000 7\n54 795 12000 7\n2 4 300 1\n2 1 200 5\n2 4 54 2\n0 0 0 0", "output": "4\n7\n6\n2\n42...
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 grid of squares with H horizontal rows and W vertical columns, where each square is painted w...
[{"input": "6 6\n..#..#\n......\n..#..\n......\n.#....\n-...#.", "output": "3\n"}, {"input": "2 6\n#.#...\n......\n..#0.\n......\n.#.-..\n--..#-", "output": "4\n"}, {"input": "6 6\n..#..#\n......\n..#..\n......\n.#....\n../.#.", "output": "3\n"}, {"input": "6 6\n..#..#\n......\n..#..\n......\n.#....\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\nThere are $n$ candies in a row, they are numbered from left to right from $1$ to $n$. The size of the $i$-th ...
[{"input": "7\n11\n3 1 4 1 5 9 1 4 10 3 5\n1\n1000\n3\n1 2 1\n13\n1 2 3 4 5 6 7 8 9 10 11 12 13\n2\n2 1\n6\n1 1 1 1 1 2\n7\n1 2 1 1 1 1 1\n", "output": "6 23 23\n1 1000 0\n2 1 3\n6 45 46\n2 2 1\n4 4 3\n4 4 4\n"}, {"input": "7\n11\n3 1 4 2 5 9 1 4 10 3 5\n1\n1000\n3\n1 2 1\n13\n1 2 3 4 5 6 7 8 9 10 11 12 13\n2\n2 1\n6\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\nOne day Alice visited Byteland to purchase jewels for her upcoming wedding anniversary.\nIn Byteland, every J...
[{"input": "4\nssss\nrsas\nsa\ns", "output": "2\n3\n2\n1\n"}, {"input": "4\ntsss\nsasr\nas\nt", "output": "3\n3\n2\n1\n"}, {"input": "4\nssss\natrs\nat\nt", "output": "2\n4\n2\n1\n"}, {"input": "4\nrsss\natsr\nbt\nt", "output": "3\n4\n2\n1\n"}, {"input": "4\nrstq\narsr\nra\nt", "output": "4\n3\n2\n1\n"}, {"input": "4\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\nIvan has got an array of n non-negative integers a_1, a_2, ..., a_{n}. Ivan knows that the array is sorted in...
[{"input": "26\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2\n", "output": "5\n"}, {"input": "26\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2\n", "output": "5\n"}, {"input": "1\n2000000000\n", "output": "2000000000\n"}, {"input": "1\n2000000000\n", "output": "2000000000\n"}, {"input": "1\n1646661570\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 two integers K and S.\nThree variable X, Y and Z takes integer values satisfying 0≤X,Y,Z≤K.\nHo...
[{"input": "100 58", "output": "1770\n"}, {"input": "100 50", "output": "1326\n"}, {"input": "101 60", "output": "1891\n"}, {"input": "111 72", "output": "2701\n"}, {"input": "111 79", "output": "3240\n"}, {"input": "278 24", "output": "325\n"}, {"input": "278 20", "output": "231\n"}, {"input": "100 22", "output": "276...
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 have two integers $l$ and $r$. Find an integer $x$ which satisfies the conditions below:\n\n $l \\le x \...
[{"input": "98766 110000\n", "output": "102345\n"}, {"input": "98766 110010\n", "output": "102345\n"}, {"input": "72073 145777\n", "output": "72081\n"}, {"input": "11097 145777\n", "output": "12034\n"}, {"input": "38912 145777\n", "output": "38912\n"}, {"input": "11097 157931\n", "output": "12034\n"}, {"input": "25610 ...
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\nHierarchical Democracy\n\nThe presidential election in Republic of Democratia is carried out through multiple...
[{"input": "6\n[[123][4567][89]]\n[[5][3][6][3][9]]\n[[[99][59][63][85][51]][[1539][7995][466]][[51][57][79][99][3][91][59]]]\n[[[37][95][31][77][25]][[43][5][5][5][85]][[71][3][51][89][29]][[57][94][5][69][31]][[99][59][65][73][31]]]\n[[[[9][7][3]][[3][5][7]][[7][9][5]]][[[9][9][3]][[5][9][9]][[7][7][3]]][[[5][9][7]][...
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 important contest will take place on the most famous programming platform (Topforces) very soon!\n\nThe a...
[{"input": "1\n37\n166320 83160 41580 33264 27720 23760 20790 18480 16632 15120 13860 11880 11088 10395 9240 10676 7920 7560 6930 6160 5940 9910 5040 4752 4620 4158 3960 3780 3696 3465 3080 3024 2970 2772 2640 29 23\n", "output": "186906\n"}, {"input": "1\n37\n166320 83160 41580 33264 27720 23760 20790 18480 16632 1512...
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\nGerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are ...
[{"input": "1000 1000 1000 1000 1000 1000\n", "output": "6000000\n"}, {"input": "1000 1000 1000 1000 1000 1000\n", "output": "6000000\n"}, {"input": "718 466 729 470 714 481\n", "output": "2102808\n"}, {"input": "677 303 685 288 692 296\n", "output": "1365807\n"}, {"input": "1000 1000 1 1000 1000 1\n", "output": "20040...
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\nproblem\n\nThere are n islands in JOI, and each island is numbered from 1 to n. Currently, the JOI country is...
[{"input": "3 8\n1 3 1 10\n0 2 3\n1 2 3 20\n1 1 2 5\n0 3 2\n1 1 3 7\n1 2 1 9\n0 2 3\n5 16\n1 1 3 343750\n1 1 3 3343\n1 1 4 347392\n1 2 5 5497\n1 2 3 123394\n1 2 4 545492\n1 2 5 458\n1 3 4 343983\n1 3 5 843468\n1 4 5 2780\n0 2 1\n0 4 1\n0 3 2\n0 4 2\n0 4 3\n0 5 3\n0 0", "output": "-1\n15\n12\n126737\n129975\n123394\n323...
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 stones, numbered 1, 2, \\ldots, N. For each i (1 \\leq i \\leq N), the height of Stone i is h_i.\...
[{"input": "6\n30 10 60 10 60 57", "output": "33\n"}, {"input": "6\n30 12 60 33 60 18", "output": "54\n"}, {"input": "6\n30 12 21 33 60 18", "output": "36\n"}, {"input": "6\n30 0 26 33 122 14", "output": "30\n"}, {"input": "6\n30 10 99 10 60 50", "output": "60\n"}, {"input": "6\n30 10 35 18 154 1", "output": "39\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\nLuckily, Serval got onto the right bus, and he came to the kindergarten on time. After coming to kindergarten...
[{"input": "2 58 77\n0 0 0 0 6 0 0 0 40 0 0 0 0 22 0 0 41 74 0 0 0 0 0 0 0 15 0 0 60 5 69 0 0 30 0 0 23 60 0 35 0 0 0 0 0 0 69 0 0 0 0 0 0 0 0 0 0 0\n0 74\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 1 0 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\nSereja and Dima play a game. The rules of the game are very simple. The players have n cards in a row. Each c...
[{"input": "95\n122 29 188 265 292 287 183 225 222 187 155 256 64 148 173 278 218 136 290 17 31 130 2 87 57 283 255 280 68 166 174 142 102 39 116 206 288 154 26 78 296 172 184 232 77 91 277 8 249 186 94 93 207 251 257 195 101 299 193 124 293 65 58 35 24 302 220 189 252 125 27 284 247 182 141 103 198 97 234 83 281 216 8...
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 an easier version of the problem with smaller constraints.\n\nKorney Korneevich dag up an array $a$ o...
[{"input": "100\n227 40 465 412 346 400 165 362 247 431 171 215 164 437 34 169 62 223 21 202 372 423 9 336 2 155 92 291 141 187 306 310 340 314 405 387 299 216 9 173 117 478 165 112 311 277 304 454 137 57 337 28 366 374 418 189 2 416 65 309 193 471 406 213 180 85 327 71 341 128 191 239 125 317 21 236 217 292 40 450 173...
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\nAlice became interested in periods of integer numbers. We say positive $X$ integer number is periodic with le...
[{"input": "98779\n163329605173223304180189399899081111990037\n", "output": "100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
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# Introduction\n\nThe first century spans from the **year 1** *up to* and **including the year 100**, **The s...
[{"input": "1705", "output": "[18]", "fn_name": "century"}, {"input": "1900", "output": "[19]", "fn_name": "century"}, {"input": "1601", "output": "[17]", "fn_name": "century"}, {"input": "2000", "output": "[20]", "fn_name": "century"}, {"input": "356", "output": "[4]", "fn_name": "century"}, {"input": "89", "output": ...
code_functional