messages listlengths 1 1 | ground_truth stringlengths 88 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\nSolve the following coding problem using the programming language python:\n\nAndrzej was given a task:\nThere... | [{"input": "16", "output": "[3]", "fn_name": "friends"}, {"input": "0", "output": "[0]", "fn_name": "friends"}, {"input": "1", "output": "[0]", "fn_name": "friends"}, {"input": "2", "output": "[0]", "fn_name": "friends"}, {"input": "4", "output": "[1]", "fn_name": "friends"}, {"input": "3", "output": "[1]", "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\nSolve the following coding problem using the programming language python:\n\nWe make a tower by stacking up b... | [{"type": "stdin_stdout", "input": "11 16", "output": "11\n"}, {"type": "stdin_stdout", "input": "31 16", "output": "24\n"}, {"type": "stdin_stdout", "input": "27 16", "output": "22\n"}, {"type": "stdin_stdout", "input": "23 60", "output": "23\n"}, {"type": "stdin_stdout", "input": "31 23", "output": "27\n"}, {"type": ... | 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\nSolve the following coding problem using the programming language python:\n\nDecades have passed since the be... | [{"type": "stdin_stdout", "input": "1000\n", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1481\n", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1998\n", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1513\n", "output": "ABD\n"}, {"type": "stdin_stdout", "input": "1285\n", "output": "ABD\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\nSolve the following coding problem using the programming language python:\n\nBerland National Library has rec... | [{"type": "stdin_stdout", "input": "50\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\n+ 100\n- 100\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\nSolve the following coding problem using the programming language python:\n\nEmuskald is addicted to Codeforc... | [{"type": "stdin_stdout", "input": "132\n13 7 33 124 118 76 94 92 16 107 130 1 46 58 28 119 42 53 102 81 99 29 57 70 125 45 100 68 10 63 34 38 19 49 56 30 103 72 106 3 121 110 78 2 31 129 128 24 77 61 87 47 15 21 88 60 5 101 82 108 84 41 86 66 79 75 54 97 55 12 69 44 83 131 9 95 11 85 52 35 115 80 111 27 109 36 39 104 ... | 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\nSolve the following coding problem using the programming language python:\n\nThe Little Elephant loves to pla... | [{"type": "stdin_stdout", "input": "100\n1 2\n2 1\n2 1\n1 2\n1 1\n1 2\n2 1\n1 1\n2 2\n2 1\n2 1\n1 1\n1 1\n2 1\n2 1\n2 1\n2 1\n2 1\n1 1\n2 1\n1 1\n1 1\n2 2\n1 2\n1 2\n1 2\n2 2\n1 2\n1 2\n2 1\n1 2\n2 1\n1 2\n2 2\n1 1\n2 1\n1 2\n2 1\n2 1\n1 2\n2 1\n2 1\n1 2\n2 1\n1 1\n1 2\n1 1\n1 1\n2 2\n2 2\n2 1\n2 1\n1 2\n2 2\n1 1\n2 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\nSolve the following coding problem using the programming language python:\n\nIn order to make the \"Sea Battl... | [{"type": "stdin_stdout", "input": "100000000 100000000 100000000 100000000\n", "output": "600000004\n"}, {"type": "stdin_stdout", "input": "100000000 100000000 100000000 100000000\n", "output": "600000004\n"}, {"type": "stdin_stdout", "input": "100000000 100000000 99999999 100000000\n", "output": "600000004\n"}, {"typ... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given a sequence $a_1, a... | [{"type": "stdin_stdout", "input": "10\n-27433367 -21216390 1 303383863 -799030648 -1 160141051 -1 -342089574 -215298491\n", "output": "28 27\n"}, {"type": "stdin_stdout", "input": "10\n-27433367 -21216390 1 303383863 -799030648 -1 160141051 -1 -342089574 -215298491\n", "output": "28 27\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nWrite a program which reads rela... | [{"type": "stdin_stdout", "input": "16 9\n0 1\n0 2\n3 4\n5 7\n5 2\n3 7\n6 13\n11 12\n8 9\n3\n0 1\n5 9\n1 3", "output": "yes\nno\nyes\n"}, {"type": "stdin_stdout", "input": "16 9\n0 1\n0 2\n3 4\n5 7\n5 2\n3 7\n6 13\n7 8\n8 9\n3\n0 1\n5 9\n1 3", "output": "yes\nyes\nyes\n"}, {"type": "stdin_stdout", "input": "16 9\n0 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\nSolve the following coding problem using the programming language python:\n\nYou are given an array a of size... | [{"type": "stdin_stdout", "input": "6 3 5\n1 2 3 4 10 6\n2 1 3\n2 3 6\n1 1 6\n2 2 1 5 3\n", "output": "3 3 1 10 2\n"}, {"type": "stdin_stdout", "input": "6 3 5\n1 2 3 4 5 12\n2 1 3\n2 3 6\n1 1 6\n2 2 1 5 4\n", "output": "3 3 1 5 12\n"}, {"type": "stdin_stdout", "input": "6 3 5\n1 2 3 4 10 6\n2 2 3\n2 3 6\n1 1 6\n2 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\nSolve the following coding problem using the programming language python:\n\nLo and Behold! For you may be su... | [{"type": "stdin_stdout", "input": "2\n18\n229", "output": "6\n10\n"}, {"type": "stdin_stdout", "input": "2\n18\n344", "output": "6\n11\n"}, {"type": "stdin_stdout", "input": "2\n128\n46", "output": "10\n8\n"}, {"type": "stdin_stdout", "input": "2\n11\n493", "output": "6\n12\n"}, {"type": "stdin_stdout", "input": "2\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\nSolve the following coding problem using the programming language python:\n\nYou are given an integer N. Amon... | [{"type": "stdin_stdout", "input": "999999999\n", "output": "26484\n"}, {"type": "stdin_stdout", "input": "500000000\n", "output": "14384\n"}, {"type": "stdin_stdout", "input": "777757375\n", "output": "26423\n"}, {"type": "stdin_stdout", "input": "777777752\n", "output": "26483\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nGiven is an integer N. Find the ... | [{"type": "stdin_stdout", "input": "100000\n", "output": "90909\n"}, {"type": "stdin_stdout", "input": "45901\n", "output": "36811\n"}, {"type": "stdin_stdout", "input": "99924\n", "output": "90834\n"}, {"type": "stdin_stdout", "input": "99999\n", "output": "90909\n"}, {"type": "stdin_stdout", "input": "100010", "outpu... | 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\nSolve the following coding problem using the programming language python:\n\nTernary numeric notation is quit... | [{"type": "stdin_stdout", "input": "..---.-.--.-..-.-.---...--.-------..-.---.-...-.-----...-.-.....-..--.---.-.-.-----.-.-.-..----.-.----.-.---.--.-..-.----..---.-..--..------.-.-.---.-.-...--....-.--.--.-.-.-..-..-...--..---.-.------.\n", "output": "00211201011210020222101211001221001100001020211122111102201220121201... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given an array $A$ of le... | [{"type": "stdin_stdout", "input": "5\n4 11 1 9 12\nLLRLL\n", "output": "9 L\n4 R\n11 R\n12 L\n1 L\n"}, {"type": "stdin_stdout", "input": "5\n5 8 2 15 10\nLLRLL\n", "output": "8 L\n5 R\n10 R\n15 L\n2 L\n"}, {"type": "stdin_stdout", "input": "5\n4 14 1 9 12\nLLRLL\n", "output": "9 L\n4 R\n12 R\n14 L\n1 L\n"}, {"ty... | 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\nSolve the following coding problem using the programming language python:\n\n# Task\n You are given a string ... | [{"input": "\"abcdxgz\"", "output": "[\"dczxgba\"]", "fn_name": "middle_permutation"}, {"input": "\"abcdxg\"", "output": "[\"cxgdba\"]", "fn_name": "middle_permutation"}, {"input": "\"abcdx\"", "output": "[\"cbxda\"]", "fn_name": "middle_permutation"}, {"input": "\"abcd\"", "output": "[\"bdca\"]", "fn_name": "middle_pe... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ of le... | [{"type": "stdin_stdout", "input": "50 50 6\n1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1\n1 1 0 1 0 1 1 0 1 1 1 1 1 1 0 1 1 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0\n", "output": "2153\n"}, {"type": "stdin_stdout", "input": "50 50 6\n1 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\nSolve the following coding problem using the programming language python:\n\nSanta Claus has received letters... | [{"type": "stdin_stdout", "input": "10\n5 48258 84644 992412 548310 132019\n5 132019 556600 548310 94345 992412\n6 132019 771663 523582 548310 463969 556600\n7 556600 132019 992412 523582 548310 70239 84644\n4 504172 548310 523582 286042\n7 548310 84644 771663 556600 132019 463969 48258\n5 556600 771663 463969 523582 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\nSolve the following coding problem using the programming language python:\n\nSmallR is an archer. SmallR is t... | [{"type": "stdin_stdout", "input": "125 1283 234 1112\n", "output": "0.33904754471037046\n"}, {"type": "stdin_stdout", "input": "719 1275 626 1265\n", "output": "0.7232359328271274\n"}, {"type": "stdin_stdout", "input": "125 1283 148 603\n", "output": "0.30545998322249646\n"}, {"type": "stdin_stdout", "input": "125 128... | 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\nSolve the following coding problem using the programming language python:\n\nYou have a given integer $n$. Fi... | [{"type": "stdin_stdout", "input": "60\n", "output": "1073741824"}, {"type": "stdin_stdout", "input": "60\n", "output": "1073741824"}, {"type": "stdin_stdout", "input": "54\n", "output": "134217728\n"}, {"type": "stdin_stdout", "input": "58\n", "output": "536870912\n"}, {"type": "stdin_stdout", "input": "56\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\nSolve the following coding problem using the programming language python:\n\nYoung boy Artem tries to paint a... | [{"type": "stdin_stdout", "input": "19\n15 73\n16 92\n22 97\n13 64\n49 127\n79 79\n66 13\n49 48\n173 75\n64 77\n27 95\n27 156\n29 53\n48 10\n265 151\n26 37\n13 2\n44 13\n85 70\n", "output": "WBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB... | 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\nSolve the following coding problem using the programming language python:\n\nIn 2020, AtCoder Inc. with an an... | [{"type": "stdin_stdout", "input": "1\n", "output": "Hello World\n"}, {"type": "stdin_stdout", "input": "2\n-2\n116", "output": "114\n"}, {"type": "stdin_stdout", "input": "2\n-2\n178", "output": "176\n"}, {"type": "stdin_stdout", "input": "2\n-2\n184", "output": "182\n"}, {"type": "stdin_stdout", "input": "2\n-2\n143"... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given a positive integer... | [{"type": "stdin_stdout", "input": "18\n36\n1 1\n1 2\n1 3\n1 6\n1 9\n1 18\n2 1\n2 2\n2 3\n2 6\n2 9\n2 18\n3 1\n3 2\n3 3\n3 6\n3 9\n3 18\n6 1\n6 2\n6 3\n6 6\n6 9\n6 18\n9 1\n9 2\n9 3\n9 6\n9 9\n9 18\n18 1\n18 2\n18 3\n18 6\n18 9\n18 18\n", "output": "1\n1\n1\n2\n1\n3\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n2\n2\n1\n1\n1\n1\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\nSolve the following coding problem using the programming language python:\n\nThe Little Elephant has an integ... | [{"type": "stdin_stdout", "input": "11100010010010000110101101101100111111001010001101101001001111010110010111001011010000001100110101000101111000001111101111110010000010101110011110101101010110001100011101111011100010011101100111110010111111100110101000000111101000000000110100100101111101000110101010101101001110001110... | 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\nSolve the following coding problem using the programming language python:\n\nA direced graph is strongly conn... | [{"type": "stdin_stdout", "input": "9 6\n1 1\n1 0\n1 4\n2 4\n4 3\n4 2\n4\n1 1\n-1 3\n2 -1\n3 4", "output": "1\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "5 6\n0 1\n1 0\n1 0\n2 4\n4 1\n3 2\n4\n0 1\n-1 0\n2 0\n3 4", "output": "1\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "9 6\n0 1\n1 0\n1 2\n2 4\n4 3\n4 2\n4\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\nSolve the following coding problem using the programming language python:\n\nINTERCAL is the oldest of esoter... | [{"type": "stdin_stdout", "input": "aMCT]:0hDJ*Up5g_l:O&>>%gjQkZkb(mi&;\\7dL\"nWOGz/;,6h*@Q0R53MS2<}F~+Ms\\\"cF-lgF0>C&y7)72\\.T\"8*#VO=|^OtYs\n", "output": "122\n212\n240\n152\n112\n94\n80\n246\n244\n208\n254\n170\n156\n98\n198\n236\n196\n218\n106\n142\n232\n0\n216\n190\n144\n204\n180\n124\n132\n144\n50\n94\n32\n50\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\nSolve the following coding problem using the programming language python:\n\nOverlooking the captivating blen... | [{"type": "stdin_stdout", "input": "100\nC?M?M?M?YM??YMYC?MCYMYM??Y??YC?CYC???YM?YM??MYMY?CYCYMYC?YC?C?CYCMY??CMC?YMCMYCYCYMYM?CYM?M?MCMCMY?Y\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "100\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\nSolve the following coding problem using the programming language python:\n\nYou are given $n$ integers $w_i ... | [{"type": "stdin_stdout", "input": "5\n0 91 14 2 11", "output": "120\n"}, {"type": "stdin_stdout", "input": "5\n0 91 14 3 11", "output": "122\n"}, {"type": "stdin_stdout", "input": "5\n1 25 13 2 11", "output": "55\n"}, {"type": "stdin_stdout", "input": "5\n0 91 9 2 11", "output": "106\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nA [Narcissistic Number](https://... | [{"input": "1634", "output": "[true]", "fn_name": "narcissistic"}, {"input": "153", "output": "[true]", "fn_name": "narcissistic"}, {"input": "370", "output": "[true]", "fn_name": "narcissistic"}, {"input": "371", "output": "[true]", "fn_name": "narcissistic"}, {"input": "1", "output": "[true]", "fn_name": "narcissisti... | 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\nSolve the following coding problem using the programming language python:\n\nPolycarp is preparing the first ... | [{"type": "stdin_stdout", "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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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\nSolve the following coding problem using the programming language python:\n\nMobile phones are equipped with ... | [{"type": "stdin_stdout", "input": "1\nben mikes bananas eht best among many fruits bec`use bananas are sweet and cheao\nb\n1\nwinners get to visit aizu and eht uvinersity of ahuz amd maje amnx friends as wlel\na\n3\nask alex about\nthe answer for the\nassignmdnt pn diordn` `pps\na\n2\ngnimmargorp si both\na sport aod ... | 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\nSolve the following coding problem using the programming language python:\n\nVova's house is an array consist... | [{"type": "stdin_stdout", "input": "187 64\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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\nSolve the following coding problem using the programming language python:\n\nIt is known that there are k fis... | [{"type": "stdin_stdout", "input": "100 50 11\n7 15 0 1 6 7 9 2 4 6 7 7 3 9 4 5 0 7 8 19 4 1 3 6 8 10 4 6 6 1 6 6 7 4 10 3 10 1 3 1 10 6 9 9 5 2 9 2 9 8 10 2 10 3 3 2 3 8 6 2 7 10 7 2 7 2 8 9 6 2 5 4 4 5 3 3 9 10 9 4 9 3 9 5 3 11 6 2 3 6 10 3 10 2 6 13 10 10 4 8\n3 3 2 9 4 4 10 2 7 3 3 2 6 3 3 4 7 4 1 2 3 8 1 6 14 7 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\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will be given ... | [{"input": "[78, 79, 52, 87, 16, 74, 31, 63, 80]", "output": "[[87, 16, 80, 31, 79, 52, 78, 63, 74]]", "fn_name": "solve"}, {"input": "[52, 77, 72, 44, 74, 76, 40]", "output": "[[77, 40, 76, 44, 74, 52, 72]]", "fn_name": "solve"}, {"input": "[1, 6, 9, 4, 3, 7, 8, 2]", "output": "[[9, 1, 8, 2, 7, 3, 6, 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\nSolve the following coding problem using the programming language python:\n\nYou are playing one RPG from the... | [{"type": "stdin_stdout", "input": "9\n475033014 267058742\n26843 148652\n850113755 279316120\n871120869 885251487\n51363 15651\n220811492 256297120\n473761699 194406678\n38725 23371\n167395720 333327477\n107541472 19164492\n74340 1113\n654389849 224345301\n663158140 437349008\n332 5052\n971865476 538450184\n959712803 ... | 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\nSolve the following coding problem using the programming language python:\n\nAs you know, every birthday part... | [{"type": "stdin_stdout", "input": "24\n14 3600\n105 64\n40 441\n15 3136\n24 1225\n42 400\n84 100\n12 4900\n120 49\n56 225\n140 36\n70 144\n168 25\n60 196\n30 784\n280 9\n10 7056\n21 1600\n28 579\n210 16\n420 4\n840 1\n35 576\n20 1764\n", "output": "3642789.7791728945\n"}, {"type": "stdin_stdout", "input": "24\n14 3600... | 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\nSolve the following coding problem using the programming language python:\n\nThe football season has just end... | [{"type": "stdin_stdout", "input": "1000000000000 68088352351238212 100000 99999\n", "output": "680883461725 61788 319116476487\n"}, {"type": "stdin_stdout", "input": "1108577267933 48182461851369906 125899 19927\n", "output": "382707249106 95156 725869923671\n"}, {"type": "stdin_stdout", "input": "1252579684821 112616... | 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\nSolve the following coding problem using the programming language python:\n\nIn an infinite array with two ro... | [{"input": "[0, 4, 6, 13]\n100", "output": "[335254562473098582210532865941148591672699700764231400858]", "fn_name": "find_a"}, {"input": "[1, 2, 3, 5]\n100", "output": "[60560100487003612846322657690093088848428068520476594299]", "fn_name": "find_a"}, {"input": "[-20, 1, -3, 14]\n-5", "output": "[-44402]", "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\nSolve the following coding problem using the programming language python:\n\nVanya got n cubes. He decided to... | [{"type": "stdin_stdout", "input": "10000\n", "output": "38\n"}, {"type": "stdin_stdout", "input": "10001\n", "output": "38\n"}, {"type": "stdin_stdout", "input": "4115\n", "output": "28\n"}, {"type": "stdin_stdout", "input": "9894\n", "output": "38\n"}, {"type": "stdin_stdout", "input": "7969\n", "output": "35\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\nSolve the following coding problem using the programming language python:\n\nThere are N bags of biscuits. Th... | [{"type": "stdin_stdout", "input": "45 1\n17 55 85 55 74 20 90 67 40 121 39 178 91 50 16 38 14 43 24 68 25 9 89 71 41 16 53 11 61 15 85 72 62 67 42 26 36 66 4 87 59 91 4 24 26", "output": "17592186044416\n"}, {"type": "stdin_stdout", "input": "45 1\n17 55 85 55 74 20 90 67 40 121 39 178 91 50 16 38 14 43 24 68 25 9 89 ... | 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\nSolve the following coding problem using the programming language python:\n\nSome days ago, I learned the con... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "999996000003000000\n"}, {"type": "stdin_stdout", "input": "862795\n", "output": "642275489615199390\n"}, {"type": "stdin_stdout", "input": "763116\n", "output": "444394078546562430\n"}, {"type": "stdin_stdout", "input": "756604\n", "output": "433115377058855412... | 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\nSolve the following coding problem using the programming language python:\n\nGiven a string, return a new str... | [{"input": "\"To be OR not to be That is the Question\"", "output": "[\"qUESTION THE IS tHAT BE TO NOT or BE tO\"]", "fn_name": "string_transformer"}, {"input": "\"You Know When THAT Hotline Bling\"", "output": "[\"bLING hOTLINE that wHEN kNOW yOU\"]", "fn_name": "string_transformer"}, {"input": "\" A b C d E f G \... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given a string S consist... | [{"type": "stdin_stdout", "input": "uncopyrightable\n", "output": "yes\n"}, {"type": "stdin_stdout", "input": "uncopyrightacle", "output": "no\n"}, {"type": "stdin_stdout", "input": "elcathgirypocnu", "output": "no\n"}, {"type": "stdin_stdout", "input": "elcathgirxpocnu", "output": "no\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nThe function is not returning th... | [{"input": "5", "output": "[\"Jupiter\"]", "fn_name": "get_planet_name"}, {"input": "8", "output": "[\"Neptune\"]", "fn_name": "get_planet_name"}, {"input": "1", "output": "[\"Mercury\"]", "fn_name": "get_planet_name"}, {"input": "2", "output": "[\"Venus\"]", "fn_name": "get_planet_name"}, {"input": "3", "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\nSolve the following coding problem using the programming language python:\n\n# Task\n A lock has `n` buttons ... | [{"input": "2000", "output": "[1333335000]", "fn_name": "press_button"}, {"input": "10", "output": "[175]", "fn_name": "press_button"}, {"input": "4", "output": "[14]", "fn_name": "press_button"}, {"input": "1", "output": "[1]", "fn_name": "press_button"}, {"input": "3", "output": "[7]", "fn_name": "press_button"}] | 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\nSolve the following coding problem using the programming language python:\n\nLittle Artem got n stones on his... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "666666667\n"}, {"type": "stdin_stdout", "input": "1001000000\n", "output": "667333333\n"}, {"type": "stdin_stdout", "input": "1001100000\n", "output": "667400000\n"}, {"type": "stdin_stdout", "input": "1001001000\n", "output": "667334000\n"}, {"type": "stdin... | 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\nSolve the following coding problem using the programming language python:\n\nTo help those contestants who st... | [{"type": "stdin_stdout", "input": "4\n6\n1 1 2 3 1 1\n5\n1 1 1 2 2\n8\n7 7 2 7 7 1 4 7\n10\n1 2 3 10 1 1 2 3 4 1\n", "output": "-1\n3\n-1\n2\n"}, {"type": "stdin_stdout", "input": "4\n6\n2 2 2 3 1 2\n5\n1 1 1 2 2\n8\n7 7 2 7 7 1 8 7\n10\n1 2 6 4 1 1 2 4 4 1\n", "output": "-1\n3\n-1\n2\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nMonocarp has been collecting rar... | [{"type": "stdin_stdout", "input": "9\n5\n01110\n10 5 8 9 6\n6\n011011\n20 10 9 30 20 19\n4\n0000\n100 100 100 100\n4\n0111\n5 4 5 1\n5\n01110\n10 5 8 9 6\n6\n011011\n20 10 9 30 20 19\n4\n0000\n100 100 100 100\n4\n0111\n5 4 5 1\n4\n0111\n5 4 5 1\n", "output": "27\n80\n0\n14\n27\n80\n0\n14\n14\n"}, {"type": "stdin_stdou... | 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\nSolve the following coding problem using the programming language python:\n\nAnalyzing the mistakes people ma... | [{"type": "stdin_stdout", "input": "250\niiffiehchidfgigdbcciahdehjjfacbbaaadagaibjjcehjcbjdhaadebaejiicgidbhajfbfejcdicgfbcchgbahfccbefdcddbjjhejigiafhdjbiiehadfficicbebeeegcebideijidbgdecffeaegjfjbbcfiabfbaiddbjgidebdiccfcgfbcbbfhaejaibeicghecchjbiaceaibfgibhgcfgifiedcbhhfadhccfdhejeggcah\njbadcfjffcfabbecfabgcafgfcg... | 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\nSolve the following coding problem using the programming language python:\n\nThere is a city that can be repr... | [{"type": "stdin_stdout", "input": "2\n2 2 4\n0 1000000\n0 1000000\n1 0\n1000000 1\n717934 1000000\n0 999999\n5 4 9\n0 1 2 6 1000000\n0 4 8 1000000\n4 4\n1 3\n2 2\n6 3\n1000000 1\n3 8\n2 8\n10 8\n1 15\n", "output": "2\n7\n"}, {"type": "stdin_stdout", "input": "2\n2 2 4\n0 1000000\n0 1000000\n0 0\n1000000 0\n172846 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\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will be given ... | [{"input": "[0, 1, 4, 5, 7, 9, 10, 13, 15, 16, 18, 19]", "output": "[15]", "fn_name": "solve"}, {"input": "[0, 1, 2, 3, 5, 8, 11, 13, 14, 16, 18, 19]", "output": "[13]", "fn_name": "solve"}, {"input": "[0, 1, 2, 3, 5, 6, 7, 11, 13, 15, 17, 19]", "output": "[17]", "fn_name": "solve"}, {"input": "[0, 5, 8, 9, 11, 13, 14,... | 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\nSolve the following coding problem using the programming language python:\n\nFind the minimum number with the... | [{"type": "stdin_stdout", "input": "45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n45\n", "output": "123456789\n123456789\n123456789\n123456789\n123456789\n123456789\n123456789\n123456789... | 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\nSolve the following coding problem using the programming language python:\n\nIn Summer Informatics School, if... | [{"type": "stdin_stdout", "input": "100\n73 81 39 85 48 49 37 20 66 41 79 32 54 71 31 50 48 29 10 85 81 20 20 20 48 54 70 40 71 31 49 77 50 33 12 87 19 12 54 39 87 10 20 39 81 18 70 53 86 7 33 37 62 9 77 54 50 30 70 81 66 12 41 12 20 23 87 73 91 75 94 49 18 71 81 32 79 85 30 94 48 10 41 62 73 90 40 70 90 91 33 100 79 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\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "100 100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 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\nSolve the following coding problem using the programming language python:\n\nPolycarp is writing the prototyp... | [{"type": "stdin_stdout", "input": "9 20\n**.......\n****.....\n******...\n*******..\n..******.\n....****.\n......***\n*.....***\n*********\n*********\n*********\n*********\n....**...\n...****..\n..******.\n.********\n****..***\n***...***\n**.....**\n*.......*\n", "output": "********......**********........********\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\nSolve the following coding problem using the programming language python:\n\nBeing tired of participating in ... | [{"type": "stdin_stdout", "input": "5\n-1 10 0 3\n1 10 2 0\n900000000 1000000000 1 9999999\n0 2 1 2\n1 3 1 2\n", "output": "-1\n-1\n10\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "5\n-1 1 0 3\n1 13 2 -1\n900000000 1000000000 1 2570333\n0 2 1 2\n1 3 1 2\n", "output": "-1\n12\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", ... | 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\nSolve the following coding problem using the programming language python:\n\nThere are some rabbits in Singap... | [{"type": "stdin_stdout", "input": "54 42164\n810471 434523 262846 930807 148016 633714 247313 376546 142288 30094 599543 829013 182512 647950 512266 827248 452285 531124 257259 453752 114536 833190 737596 267349 598567 781294 390500 318098 354290 725051 978831 905185 849542 761886 55532 608148 631077 557070 355245 929... | 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\nSolve the following coding problem using the programming language python:\n\nConsider all binary strings of l... | [{"type": "stdin_stdout", "input": "5\n3 3\n010\n001\n111\n4 3\n000\n111\n100\n011\n1 1\n1\n1 1\n0\n3 2\n00\n01\n10\n", "output": "100\n010\n0\n1\n11\n"}, {"type": "stdin_stdout", "input": "5\n3 3\n010\n001\n110\n4 3\n000\n111\n100\n011\n1 1\n1\n1 1\n0\n3 2\n00\n01\n10\n", "output": "100\n010\n0\n1\n11\n"}, {"type": "s... | 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\nSolve the following coding problem using the programming language python:\n\nIn some countries of former Sovi... | [{"input": "\"943294329932\"", "output": "[false]", "fn_name": "luck_check"}, {"input": "\"1233499943\"", "output": "[false]", "fn_name": "luck_check"}, {"input": "\"543970707\"", "output": "[false]", "fn_name": "luck_check"}, {"input": "\"439924\"", "output": "[false]", "fn_name": "luck_check"}, {"input": "\"935336\""... | 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\nSolve the following coding problem using the programming language python:\n\nIn the official contest this pro... | [{"type": "stdin_stdout", "input": "20\n713900269 224495293 592111899 609607891 585084800 601258511 223103775 876894656 751583891 230837577 971499807 312977833 344314550 397998873 558637732 216574673 913028292 762852863 464376621 61315042\n", "output": "375537226\n"}, {"type": "stdin_stdout", "input": "20\n713900269 22... | 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\nSolve the following coding problem using the programming language python:\n\nA few years ago, Hitagi encounte... | [{"type": "stdin_stdout", "input": "100 5\n175 30 124 0 12 111 6 0 119 108 0 38 127 3 151 114 95 54 4 128 91 11 168 120 80 107 18 21 149 169 0 141 195 20 78 157 33 118 17 69 105 130 197 57 74 110 138 84 71 172 132 93 191 44 152 156 24 101 146 26 2 36 143 122 104 42 103 97 39 116 115 0 155 87 53 85 7 43 65 196 136 154 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\nSolve the following coding problem using the programming language python:\n\nFor encrypting strings this regi... | [{"input": "\"$-Wy,dM79H'i'o$n0C&I.ZTcMJw5vPlZc Hn!krhlaa:khV mkL;gvtP-S7Rt1Vp2RV:wV9VuhO Iz3dqb.U0w\"", "output": "[\"Do the kata \\\"Kobayashi-Maru-Test!\\\" Endless fun and excitement when finding a solution!\"]", "fn_name": "decrypt"}, {"input": "\"5MyQa79H'ijQaw!Ns6jVtpmnlZ.V6p\"", "output": "[\"This kata is very ... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given a prime number $p$... | [{"type": "stdin_stdout", "input": "7 7 3\n4 0 5 3 1 2 6\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "7 7 3\n4 0 5 3 1 2 6\n", "output": "0"}, {"type": "stdin_stdout", "input": "6 7 2\n1 2 3 4 5 6\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "6 7 2\n1 2 3 4 5 6\n", "output": "3"}, {"type": "stdin... | 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\nSolve the following coding problem using the programming language python:\n\nWe have two desks: A and B. Desk... | [{"type": "stdin_stdout", "input": "5 4 1\n1000000000 1000000000 1000000000 1000000000 1000000000\n1000000000 1000000000 1000000000 1000000000\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "5 4 1\n1000000000 1000000000 1000000000 1000000000 1000000000\n1000000000 1000000000 1000000010 1000000000", "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\nSolve the following coding problem using the programming language python:\n\nA soldier wants to buy w bananas... | [{"type": "stdin_stdout", "input": "1000 61465564 1000\n", "output": "439034436\n"}, {"type": "stdin_stdout", "input": "859 453892 543\n", "output": "126416972\n"}, {"type": "stdin_stdout", "input": "859 453892 889\n", "output": "339370803\n"}, {"type": "stdin_stdout", "input": "859 267939 889\n", "output": "339556756\... | 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\nSolve the following coding problem using the programming language python:\n\nThe Earth has been invaded by al... | [{"input": "\".----..---...--....-.....-....--...---..----.-----\"", "output": "[1234567890]", "fn_name": "morse_converter"}, {"input": "\"..----------...-....----------\"", "output": "[207600]", "fn_name": "morse_converter"}, {"input": "\".----.----.----.----.----\"", "output": "[11111]", "fn_name": "morse_converter"}... | 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\nSolve the following coding problem using the programming language python:\n\nFox Ciel is playing a card game ... | [{"type": "stdin_stdout", "input": "36 30\nATK 116\nATK 120\nATK 122\nATK 120\nATK 116\nATK 118\nATK 123\nDEF 2564\nATK 123\nDEF 1810\nATK 124\nATK 120\nDEF 2598\nATK 119\nDEF 2103\nATK 123\nATK 118\nATK 118\nATK 123\nDEF 1988\nATK 122\nATK 120\nDEF 2494\nATK 122\nATK 124\nATK 117\nATK 121\nATK 118\nATK 117\nATK 122\nA... | 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\nSolve the following coding problem using the programming language python:\n\nIn Russia regular bus tickets us... | [{"input": "\"12341234\"", "output": "[false]", "fn_name": "is_lucky"}, {"input": "\"100200\"", "output": "[false]", "fn_name": "is_lucky"}, {"input": "\"12a12a\"", "output": "[false]", "fn_name": "is_lucky"}, {"input": "\"123321\"", "output": "[true]", "fn_name": "is_lucky"}, {"input": "\"100001\"", "output": "[true]"... | 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\nSolve the following coding problem using the programming language python:\n\nWhile dad was at work, a little ... | [{"type": "stdin_stdout", "input": "100\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\naaa\... | 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\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ consi... | [{"type": "stdin_stdout", "input": "5\n1 3 4\n2 3 0\n2 4 3\n1 500000 1\n2 800 0\n", "output": "4\n4\n1\n"}, {"type": "stdin_stdout", "input": "5\n1 3 4\n2 3 0\n2 4 3\n1 500000 1\n2 800 0\n", "output": "4\n4\n1\n"}, {"type": "stdin_stdout", "input": "5\n1 3 4\n2 3 0\n2 4 3\n1 4 -4\n2 1 0\n", "output": "4\n4\n0\n"}, {"ty... | 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\nSolve the following coding problem using the programming language python:\n\nThere is a building consisting o... | [{"type": "stdin_stdout", "input": "36\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n9999\n", "output": "90\n90\n90\n90\n90\n90\n90\n90\n90\n90\n90\n90\n90... | 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\nSolve the following coding problem using the programming language python:\n\nEzzat has an array of $n$ intege... | [{"type": "stdin_stdout", "input": "4\n3\n3 1 2\n3\n-7 -6 -6\n3\n2 2 2\n4\n17 3 5 -3\n", "output": "4.500000000\n-12.500000000\n4.000000000\n18.666666667\n"}, {"type": "stdin_stdout", "input": "4\n3\n3 1 3\n3\n-10 -3 -5\n3\n2 3 0\n4\n14 3 2 -1\n", "output": "5.0\n-10.5\n4.0\n15.333333333333334\n"}, {"type": "stdin_stdo... | 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\nSolve the following coding problem using the programming language python:\n\nMahmoud wrote a message s of len... | [{"type": "stdin_stdout", "input": "55\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\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\n", "output": "383381198\n55\n1\n"}, {"type": "stdin_stdout", "input": "55\naaaaaaaaaaaaaaaaa... | 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\nSolve the following coding problem using the programming language python:\n\nCreate a function that interpret... | [{"input": "\"+LTQII>+WN<P>+E\"", "output": "[\"1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94... | 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\nSolve the following coding problem using the programming language python:\n\nProblem statement\n\nReal variab... | [{"type": "stdin_stdout", "input": "2 1\n-1 0\n3 10", "output": "6.66666666667\n"}, {"type": "stdin_stdout", "input": "1 1\n3 2", "output": "0.666666666667\n"}, {"type": "stdin_stdout", "input": "1 2\n6 1", "output": "0.333333333333\n"}, {"type": "stdin_stdout", "input": "2 1\n-1 -3\n3 10", "output": "3.666667"}, {"typ... | 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\nSolve the following coding problem using the programming language python:\n\nThere are N towns in Takahashi K... | [{"type": "stdin_stdout", "input": "107 137", "output": "944428092\n"}, {"type": "stdin_stdout", "input": "21 300", "output": "213825142\n"}, {"type": "stdin_stdout", "input": "13 300", "output": "572293777\n"}, {"type": "stdin_stdout", "input": "13 146", "output": "392822654\n"}, {"type": "stdin_stdout", "input": "62 ... | 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\nSolve the following coding problem using the programming language python:\n\nATM machines allow 4 or 6 digit ... | [{"input": "\"00000000\"", "output": "[false]", "fn_name": "validate_pin"}, {"input": "\"1234567\"", "output": "[false]", "fn_name": "validate_pin"}, {"input": "\"-12345\"", "output": "[false]", "fn_name": "validate_pin"}, {"input": "\"12345\"", "output": "[false]", "fn_name": "validate_pin"}, {"input": "\"-1234\"", "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\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will be given ... | [{"input": "999999999992", "output": "[999999999989]", "fn_name": "solve"}, {"input": "79320", "output": "[78999]", "fn_name": "solve"}, {"input": "99004", "output": "[98999]", "fn_name": "solve"}, {"input": "99088", "output": "[98999]", "fn_name": "solve"}, {"input": "99737", "output": "[98999]", "fn_name": "solve"}, ... | 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\nSolve the following coding problem using the programming language python:\n\nBertown is a city with $n$ build... | [{"type": "stdin_stdout", "input": "2\n1 1\n01000010\n10 1\n01101110\n", "output": "2\n11\n"}, {"type": "stdin_stdout", "input": "2\n2 1\n11000110\n10 1\n01101111\n", "output": "4\n11\n"}, {"type": "stdin_stdout", "input": "2\n1 1\n01010010\n10 1\n01101100\n", "output": "3\n11\n"}, {"type": "stdin_stdout", "input": "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\nSolve the following coding problem using the programming language python:\n\nThere are n beacons located at d... | [{"type": "stdin_stdout", "input": "11\n110 90\n100 70\n148 10\n80 10\n70 1\n60 1\n50 10\n40 1\n30 1\n10 1\n20 1\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "11\n110 90\n100 70\n90 10\n80 10\n70 1\n60 1\n50 10\n40 1\n30 1\n10 1\n20 1\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "11\n110 61\n100 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\nSolve the following coding problem using the programming language python:\n\nPolycarp is playing a new comput... | [{"type": "stdin_stdout", "input": "1\n52\n1 3 3 4 5 10 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 48 29 30 31 32 49 34 35 36 37 38 39 40 41 42 43 21 45 46 47 48 49 50 51 52\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1\n52\n1 3 3 4 5 10 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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\nSolve the following coding problem using the programming language python:\n\nAnton likes to listen to fairy t... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1100000000000000000\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\nSolve the following coding problem using the programming language python:\n\nThere are N people living on a n... | [{"type": "stdin_stdout", "input": "100\n1 1 1 100 100 1 100 1 100 100 100 1 100 1 1 1 100 1 100 100 100 1 1 100 100 100 100 100 100 1 1 100 100 100 100 100 1 100 1 1 1 100 100 100 1 100 1 100 100 1 1 1 1 1 1 100 1 1 100 1 1 1 100 100 1 1 100 100 100 100 100 1 100 1 1 100 1 1 1 100 1 100 100 100 1 1 1 100 1 1 100 100 1... | code_stdio |
[
{
"content": "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\nSolve the following coding problem using the programming language python:\n\nYou are given four integers $n$,... | [{"type": "stdin_stdout", "input": "7\n10 3 1 1\n1000000110\n1 10 1 1000\n0\n1 1 10 2\n1\n4 4 4 1\n1001\n1 1 1 1\n1\n2 1000 500 1000\n11\n3 500 500 1\n101\n", "output": "17\n10\n3\n16\n1\n1000\n1500\n"}, {"type": "stdin_stdout", "input": "7\n10 3 1 1\n1000000110\n1 10 1 1000\n0\n1 1 10 2\n1\n4 4 4 1\n1001\n1 1 1 1\n1\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\nSolve the following coding problem using the programming language python:\n\nYou are given an array a of leng... | [{"type": "stdin_stdout", "input": "3\n5\n0 4 1 5 3\n5\n10 3 0 4 1\n2\n1 1 1 1\n", "output": "1\n2\n0\n"}, {"type": "stdin_stdout", "input": "3\n5\n0 4 1 5 3\n5\n10 3 0 5 1\n2\n1 1 1 1\n", "output": "1\n2\n0\n"}, {"type": "stdin_stdout", "input": "3\n5\n2 4 1 5 3\n5\n5 3 2 0 1\n4\n1 1 1 1\n", "output": "1\n3\n0\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\nSolve the following coding problem using the programming language python:\n\nYou've got an array, consisting ... | [{"type": "stdin_stdout", "input": "100 10\n53 72 2 58 6 48 65 13 43 9 77 1 58 28 49 95 12 11 7 36 51 25 78 20 6 2 69 76 1 47 17 6 91 54 50 66 69 122 74 31 19 96 35 84 163 15 65 73 66 73 29 53 17 47 3 19 4 16 85 6 49 6 57 70 96 19 66 92 86 61 10 21 11 82 13 98 59 96 85 1 13 65 28 34 143 16 88 32 60 50 33 37 36 57 97 28... | 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\nSolve the following coding problem using the programming language python:\n\nProblem\n\nGiven the string S, w... | [{"type": "stdin_stdout", "input": "0ig3hd12fz99", "output": "10\n"}, {"type": "stdin_stdout", "input": "0hg3hd12fz99", "output": "11\n"}, {"type": "stdin_stdout", "input": "0hg3hd13fz99", "output": "12\n"}, {"type": "stdin_stdout", "input": "0hf3hd12fz99", "output": "11\n"}, {"type": "stdin_stdout", "input": "99zf21dh... | 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\nSolve the following coding problem using the programming language python:\n\nBased on [this kata, Connect Fou... | [{"input": "[\"C_R\", \"p_Y\", \"a_B\", \"Q_T\", \"s_S\", \"I_R\", \"Z_Y\", \"a_B\", \"c_T\", \"d_S\", \"O_R\", \"C_Y\", \"M_B\", \"Q_T\", \"O_S\", \"I_R\", \"U_Y\", \"J_B\", \"K_T\", \"V_S\", \"i_R\", \"o_Y\", \"r_B\", \"H_T\", \"I_S\", \"C_R\", \"n_Y\", \"W_B\", \"G_T\", \"j_S\", \"p_R\", \"m_Y\", \"Y_B\", \"b_T\", \... | 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\nSolve the following coding problem using the programming language python:\n\nWrite a function that takes a st... | [{"input": "\"1 2 3 4 5\"", "output": "[15]", "fn_name": "summy"}, {"input": "\"1 2 3 4\"", "output": "[10]", "fn_name": "summy"}, {"input": "\"10 10\"", "output": "[20]", "fn_name": "summy"}, {"input": "\"1 2 3\"", "output": "[6]", "fn_name": "summy"}, {"input": "\"0 0\"", "output": "[0]", "fn_name": "summy"}] | 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\nSolve the following coding problem using the programming language python:\n\nVasya owns three big integers β ... | [{"type": "stdin_stdout", "input": "12212222221212222221221221222222121222222122\n22222111112222222222221221222222121222222122\n22222111112222222222221221222222121222222122\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "12212222221212222221221221222222121222222122\n28110439567417001223290131317494419039608149... | 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\nSolve the following coding problem using the programming language python:\n\nMemory and his friend Lexa are c... | [{"type": "stdin_stdout", "input": "87 100 200 80\n", "output": " 913761305\n"}, {"type": "stdin_stdout", "input": "38 38 701 74\n", "output": " 496603581\n"}, {"type": "stdin_stdout", "input": "40 94 510 53\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\nSolve the following coding problem using the programming language python:\n\n# Task\nJohn was in math class a... | [{"input": "1000\n999", "output": "[1000]", "fn_name": "folding"}, {"input": "1000\n700", "output": "[6]", "fn_name": "folding"}, {"input": "10\n7", "output": "[6]", "fn_name": "folding"}, {"input": "2\n1", "output": "[2]", "fn_name": "folding"}, {"input": "3\n1", "output": "[3]", "fn_name": "folding"}, {"input": "4\n1... | 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\nSolve the following coding problem using the programming language python:\n\nproblem\n\nGiven the sequence $ ... | [{"type": "stdin_stdout", "input": "5\n2 10 5 22 4", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n1 6 7 31 10", "output": "1\n"}, {"type": "stdin_stdout", "input": "5\n1 8 7 31 12", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n2 10 5 22 8", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\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\nSolve the following coding problem using the programming language python:\n\nGiven a string of integers, retu... | [{"input": "\"13472315\"", "output": "[28]", "fn_name": "solve"}, {"input": "\"1347231\"", "output": "[20]", "fn_name": "solve"}, {"input": "\"134721\"", "output": "[13]", "fn_name": "solve"}, {"input": "\"13471\"", "output": "[12]", "fn_name": "solve"}, {"input": "\"1357\"", "output": "[10]", "fn_name": "solve"}, {"in... | 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\nSolve the following coding problem using the programming language python:\n\nAmr doesn't like Maths as he fin... | [{"type": "stdin_stdout", "input": "1000 100 777767777\n", "output": "577920877\n"}, {"type": "stdin_stdout", "input": "1000 100 777767777\n", "output": "577920877"}, {"type": "stdin_stdout", "input": "886 10 902171654\n", "output": "134375492\n"}, {"type": "stdin_stdout", "input": "712 53 592302770\n", "output": "1476... | 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\nSolve the following coding problem using the programming language python:\n\nThere is a circle with a circumf... | [{"type": "stdin_stdout", "input": "4 20 18\n7 2\n9 1\n12 1\n18 1", "output": "10\n16\n7\n9\n"}, {"type": "stdin_stdout", "input": "4 20 18\n3 2\n9 1\n12 1\n18 1", "output": "10\n16\n5\n7\n"}, {"type": "stdin_stdout", "input": "4 20 18\n3 2\n9 1\n12 1\n18 2", "output": "5\n7\n10\n0\n"}, {"type": "stdin_stdout", "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\nSolve the following coding problem using the programming language python:\n\nNathan O. Davis has been running... | [{"type": "stdin_stdout", "input": "1\n0\nccpi", "output": "ccpi\n"}, {"type": "stdin_stdout", "input": "1\n0\nipcc", "output": "ipcc\n"}, {"type": "stdin_stdout", "input": "1\n0\njpcc", "output": "jpcc\n"}, {"type": "stdin_stdout", "input": "1\n0\ncbpi", "output": "cbpi\n"}, {"type": "stdin_stdout", "input": "1\n0\nio... | 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\nSolve the following coding problem using the programming language python:\n\n# Task\n Given a string `s`, fin... | [{"input": "\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaabc\"", "output": "[false]", "fn_name": "palindrome_rearranging"}, {"input": "\"zyyzzzzz\"", "output": "[true]", "fn_name": "palindrome_rearranging"}, {"input": "\"abbcabb\"", "output": "[true]", "fn_name": "palindrome_rearranging"}, {"input": "\"aaabbb\"", "output": "[false]"... | 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\nSolve the following coding problem using the programming language python:\n\n# Task\n A ciphertext alphabet i... | [{"input": "\"jpeuizmi\"\n\"mxxcwriq\"", "output": "[false]", "fn_name": "is_substitution_cipher"}, {"input": "\"aaxxaaz\"\n\"aazzaay\"", "output": "[true]", "fn_name": "is_substitution_cipher"}, {"input": "\"aaxyaa\"\n\"aazzaa\"", "output": "[false]", "fn_name": "is_substitution_cipher"}, {"input": "\"aazzaa\"\n\"aaxy... | 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\nSolve the following coding problem using the programming language python:\n\nAlice and Borys are playing tenn... | [{"type": "stdin_stdout", "input": "2\n99998 1\n1 99998\n", "output": "4\n49998 49999 50000 50001\n4\n49998 49999 50000 50001\n"}, {"type": "stdin_stdout", "input": "2\n99999 0\n0 99999\n", "output": "2\n49999 50000\n2\n49999 50000\n"}, {"type": "stdin_stdout", "input": "2\n99999 1\n1 99999\n", "output": "2\n49999 5000... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.