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\nA fraction whose numerator is 1 ... | [{"type": "stdin_stdout", "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"}, {"type": "stdin_stdout", "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 ... | 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$ candies in a row, ... | [{"type": "stdin_stdout", "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"}, {"type": "stdin_stdout", "input": "7\n11\n3 1 4 2 5 9 1 4 10 3 5\n1\n1000\n3\n1 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\nOne day Alice visited Byteland t... | [{"type": "stdin_stdout", "input": "4\nssss\nrsas\nsa\ns", "output": "2\n3\n2\n1\n"}, {"type": "stdin_stdout", "input": "4\ntsss\nsasr\nas\nt", "output": "3\n3\n2\n1\n"}, {"type": "stdin_stdout", "input": "4\nssss\natrs\nat\nt", "output": "2\n4\n2\n1\n"}, {"type": "stdin_stdout", "input": "4\nrsss\natsr\nbt\nt", "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\nIvan has got an array of n non-n... | [{"type": "stdin_stdout", "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"}, {"type": "stdin_stdout", "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"}, {"type": "stdin_stdout", "input": "1\n2000000000\n", "output": "2000000000\n"}, {"type": "std... | 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 two integers K and... | [{"type": "stdin_stdout", "input": "100 58", "output": "1770\n"}, {"type": "stdin_stdout", "input": "100 50", "output": "1326\n"}, {"type": "stdin_stdout", "input": "101 60", "output": "1891\n"}, {"type": "stdin_stdout", "input": "111 72", "output": "2701\n"}, {"type": "stdin_stdout", "input": "111 79", "output": "3240... | 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\nHierarchical Democracy\n\nThe pr... | [{"type": "stdin_stdout", "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]][... | 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\nOne important contest will take ... | [{"type": "stdin_stdout", "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"}, {"type": "stdin_stdout", "input": "1\n37\n166320 8316... | 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\nGerald got a very curious hexago... | [{"type": "stdin_stdout", "input": "1000 1000 1000 1000 1000 1000\n", "output": "6000000\n"}, {"type": "stdin_stdout", "input": "1000 1000 1000 1000 1000 1000\n", "output": "6000000\n"}, {"type": "stdin_stdout", "input": "718 466 729 470 714 481\n", "output": "2102808\n"}, {"type": "stdin_stdout", "input": "677 303 685... | 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\nThere are n islands i... | [{"type": "stdin_stdout", "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\n126... | 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 stones, numbered 1, ... | [{"type": "stdin_stdout", "input": "6\n30 10 60 10 60 57", "output": "33\n"}, {"type": "stdin_stdout", "input": "6\n30 12 60 33 60 18", "output": "54\n"}, {"type": "stdin_stdout", "input": "6\n30 12 21 33 60 18", "output": "36\n"}, {"type": "stdin_stdout", "input": "6\n30 0 26 33 122 14", "output": "30\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\nLuckily, Serval got onto the rig... | [{"type": "stdin_stdout", "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... | 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\nYou have to write a ... | [{"input": "5", "output": "[\"1\\n333\\n55555\"]", "fn_name": "pattern"}, {"input": "4", "output": "[\"1\\n333\"]", "fn_name": "pattern"}, {"input": "-25", "output": "[\"\"]", "fn_name": "pattern"}, {"input": "1", "output": "[\"1\"]", "fn_name": "pattern"}, {"input": "0", "output": "[\"\"]", "fn_name": "pattern"}] | 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 have stumbled across the div... | [{"input": "[[\"_\", \"_\", \"_\", \"_\"], [\"_\", \"_\", \"_\", \"@\"], [\"_\", \"_\", \"@\", \"_\"]]\n2\n2", "output": "[\"Clean\"]", "fn_name": "crap"}, {"input": "[[\"_\", \"_\", \"_\", \"_\"], [\"_\", \"_\", \"_\", \"_\"], [\"_\", \"_\", \"_\", \"_\"]]\n2\n2", "output": "[\"Clean\"]", "fn_name": "crap"}, {"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\nSolve the following coding problem using the programming language python:\n\n# Task\n\nFind the integer from ... | [{"input": "159\n4", "output": "[\"Error\"]", "fn_name": "div_num"}, {"input": "52\n156", "output": "[120]", "fn_name": "div_num"}, {"input": "15\n30", "output": "[24]", "fn_name": "div_num"}, {"input": "15\n48", "output": "[48]", "fn_name": "div_num"}, {"input": "1\n2", "output": "[2]", "fn_name": "div_num"}] | 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\nJohnny needs to make a rectangul... | [{"type": "stdin_stdout", "input": "2\n40 46\n60 14", "output": "15.38\n0.83\n"}, {"type": "stdin_stdout", "input": "2\n20 16\n20 10", "output": "4.15\n1.42\n"}, {"type": "stdin_stdout", "input": "2\n32 20\n20 10", "output": "3.43\n1.42\n"}, {"type": "stdin_stdout", "input": "2\n32 42\n20 14", "output": "18.15\n3.0\n"}... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an easier version of the... | [{"type": "stdin_stdout", "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 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\nAlice became interested in perio... | [{"type": "stdin_stdout", "input": "98779\n163329605173223304180189399899081111990037\n", "output": "100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000... | 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\nVasily has a deck of cards consi... | [{"type": "stdin_stdout", "input": "100\n9 9 72 55 14 8 55 58 35 67 3 18 73 92 41 49 15 60 18 66 9 26 97 47 43 88 71 97 19 34 48 96 79 53 8 24 69 49 12 23 77 12 21 88 66 9 29 13 61 69 54 77 41 13 4 68 37 74 7 6 29 76 55 72 89 4 78 27 29 82 18 83 12 4 32 69 89 85 66 13 92 54 38 5 26 56 17 55 29 4 17 39 29 94 3 67 85 98 ... | 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# Introduction\n\nThe first cent... | [{"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 |
[
{
"content": "You are an expert Python programmer. 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 some positive integers, I ... | [{"input": "1\n12\n34", "output": "[\"01\\n12\\n34\"]", "fn_name": "print_nums"}, {"input": "1009\n2", "output": "[\"1009\\n0002\"]", "fn_name": "print_nums"}, {"input": "1\n1\n13", "output": "[\"01\\n01\\n13\"]", "fn_name": "print_nums"}, {"input": "1\n8\n27", "output": "[\"01\\n08\\n27\"]", "fn_name": "print_nums"}, ... | 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\"Contestant who earns a score e... | [{"type": "stdin_stdout", "input": "50 44\n100 100 99 97 95 91 91 84 83 83 79 71 70 69 69 62 61 60 59 59 58 102 58 55 55 54 52 48 47 45 44 44 38 36 38 31 28 28 25 25 24 24 24 22 17 15 14 13 12 4\n", "output": "44\n"}, {"type": "stdin_stdout", "input": "50 44\n100 100 99 97 95 91 91 84 83 83 79 71 70 69 69 62 61 60 59 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEverything got unclear to us in ... | [{"type": "stdin_stdout", "input": "abbabaaabaaabbbbabbbbbababababaaaabbabbbbabbbbbabbbbababbaaaaabbbabbbbabbbbbbabaabababaabbbabababbaz\nabaaabaabbbbaabbbbaabababbaabaabababbbaabbbaaabbabbabbbbbbbbaabbbbbabababbbbaaabaaaabbbbbbbbabababba\n", "output": "abaaabaabbbbaabbbbaabababbaabaabababbbaabbbaaabbabbabbbbbbbbaabbbb... | 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\nIncreasing E869120 (Ninja E86912... | [{"type": "stdin_stdout", "input": "5\nE869120\nTMJN\nE869120\nASIAT\nYNYMXIAOLONGBAO", "output": "2\n"}, {"type": "stdin_stdout", "input": "5\nE869120\nTMJN\nE809126\nATIAT\nYNYMXIAOGONLBAO", "output": "1\n"}, {"type": "stdin_stdout", "input": "5\nE86912/\nTMJN\n621908E\nIATSA\nYNYMXIBOGONLBAO", "output": "0\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\nYou are given a tree (an undirec... | [{"type": "stdin_stdout", "input": "3 1000000000\n3 2\n2 1\n", "output": "1000000000.0000000000\n"}, {"type": "stdin_stdout", "input": "2 1000000000\n2 1\n", "output": "1000000000.0000000000\n"}, {"type": "stdin_stdout", "input": "6 1\n2 1\n4 3\n2 5\n5 4\n5 6\n", "output": "0.6666666667\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\nIevan Ritola is a researcher of ... | [{"type": "stdin_stdout", "input": "2\n1 0 8\n1 -1 3", "output": "11 / 1\n"}, {"type": "stdin_stdout", "input": "2\n1 2 7\n2 3 12", "output": "19 / 1\n"}, {"type": "stdin_stdout", "input": "2\n1 0 7\n2 3 12", "output": "12 / 1\n"}, {"type": "stdin_stdout", "input": "2\n0 1 14\n0 0 0", "output": "14 / 1\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 mathematics, a [Diophantine e... | [{"input": "900000012", "output": "[[[225000004, 112500001], [75000004, 37499999], [3358276, 1679071], [1119604, 559601]]]", "fn_name": "sol_equa"}, {"input": "90000001", "output": "[[[45000001, 22500000], [6428575, 3214284], [3461545, 1730766], [494551, 247230]]]", "fn_name": "sol_equa"}, {"input": "90009", "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\nFind the largest square number n... | [{"type": "stdin_stdout", "input": "1205711547", "output": "1205686729\n"}, {"type": "stdin_stdout", "input": "1258489257", "output": "1258475625\n"}, {"type": "stdin_stdout", "input": "1044195797", "output": "1044194596\n"}, {"type": "stdin_stdout", "input": "271828182\n", "output": "271821169\n"}, {"type": "stdin_std... | 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 two integer arrays where t... | [{"input": "[4, 3, 3, 61, 8, 8]\n[8, 61, 8, 3, 4]", "output": "[3]", "fn_name": "find_missing"}, {"input": "[6, 1, 3, 6, 8, 2]\n[3, 6, 6, 1, 2]", "output": "[8]", "fn_name": "find_missing"}, {"input": "[0, 0, 0, 0, 0]\n[0, 0, 0, 0]", "output": "[0]", "fn_name": "find_missing"}, {"input": "[1, 2, 3]\n[1, 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\nYou are given a string $s$ of le... | [{"type": "stdin_stdout", "input": "1\naaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbab\n", "output": "baaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbab\n"}, {"type": "stdin_stdout", "input": "1\nabbabababbabababbababbbabbbbabbbabaabaabba\n", "output": "abbabababbabababbababbbabbbbabbbabaabaabba\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\nVery soon Berland will hold a Sc... | [{"type": "stdin_stdout", "input": "10 4\nigtVqPgoW 3 24\nuc 1 381\nOxmov[Av 4 727\nxyRAaAk 2 378\nvYCV 4 67\nuf 2 478\nDawOytiYiH 1 775\nRS 1 663\npLhTehhjA 2 38\nkYWfb 3 595\n", "output": "DawOytiYiH RS\nuf xyRAaAk\nkYWfb igtVqPgoW\nOxmov[Av vYCV\n"}, {"type": "stdin_stdout", "input": "10 4\nigtVqPgoW 3 24\nuc 1 381\... | 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\nOne day Sasha visited the farmer... | [{"type": "stdin_stdout", "input": "166\n61 19 19 67 11 11 73 89 73 11 47 2 59 43 61 31 19 83 71 19 29 97 89 97 2 11 5 73 19 2 19 7 41 53 5 23 11 89 2 23 47 47 83 71 17 71 67 67 43 3 29 97 17 83 11 19 67 17 97 7 19 29 29 41 13 71 29 19 19 43 47 17 71 3 13 71 41 19 47 7 29 43 29 97 31 11 43 17 23 83 37 61 79 31 17 5 59 ... | 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\nNormally, we decompose a number ... | [{"input": "1234567", "output": "[[1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1]]", "fn_name": "true_binary"}, {"input": "47", "output": "[[1, 1, -1, 1, 1, 1]]", "fn_name": "true_binary"}, {"input": "25", "output": "[[1, 1, 1, -1, -1]]", "fn_name": "true_binary"}, {"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\nHappy PMP is freshman and he is ... | [{"type": "stdin_stdout", "input": "20\n1 12 9 6 11 13 2 8 20 7 16 19 4 18 3 15 10 17 14 5\n5 14 17 10 15 3 18 4 19 16 7 20 8 2 13 11 6 9 12 1\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "10\n8 2 10 3 4 6 1 7 9 5\n8 2 10 3 4 6 1 7 9 5\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n2 1 10 3 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\nYou've got another geometrical t... | [{"type": "stdin_stdout", "input": "3\n-1000000000 1000000000\n1000000000 0\n1000 -1000000000\n3\n1000 -999999999\n1000 0\n1001 0\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "6\n2 4\n4 2\n3 -1\n-1 -3\n-3 0\n-2 3\n12\n0 3\n0 2\n1 2\n2 3\n3 2\n1 1\n2 0\n0 -2\n0 0\n-1 -1\n-2 0\n-1 1\n", "output": "YES\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\nItβs still hot every day, but Se... | [{"type": "stdin_stdout", "input": "-7 1028", "output": "1035\n"}, {"type": "stdin_stdout", "input": "-2 1028", "output": "1030\n"}, {"type": "stdin_stdout", "input": "-2 1094", "output": "1096\n"}, {"type": "stdin_stdout", "input": "-2 1349", "output": "1351\n"}, {"type": "stdin_stdout", "input": "-3 1349", "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\nSummer holidays! Someone is goin... | [{"type": "stdin_stdout", "input": "50 2\n74 90\n68 33\n49 88\n52 13\n73 21\n77 63\n27 62\n8 52\n60 57\n42 83\n98 15\n79 11\n77 46\n55 91\n72 100\n70 86\n50 51\n57 39\n20 54\n64 95\n66 22\n79 64\n31 28\n11 89\n1 36\n13 4\n75 62\n16 62\n100 35\n43 96\n97 54\n86 33\n62 63\n94 24\n19 6\n20 58\n38 38\n11 76\n70 40\n44 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\nSolve the following coding problem using the programming language python:\n\nIahub helps his grandfather at t... | [{"type": "stdin_stdout", "input": "100\n1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1 0 1 1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 1 0 0 1 0 0\n", "output": "1446\n"}, {"type": "stdin_stdout", "input": "100\n1 1 0 0 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\nShichi-Go-San (literally \"Seven... | [{"type": "stdin_stdout", "input": "-132", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-154", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-133", "output": "NO\n"}, {"type": "stdin_stdout", "input": "-108", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1271", "output": "NO\n"}, {"type": "stdi... | 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\nTwo students of AtCoder Kinderga... | [{"type": "stdin_stdout", "input": "10 30 20\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "30 30 100\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "56 25 31\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "30 30 000", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "106 25 31", "... | 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ΠΠ°ΡΡΠ° Π·Π²ΡΠ·Π΄Π½ΠΎΠ³ΠΎ Π½Π΅Π±Π° ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»ΡΠ΅... | [{"type": "stdin_stdout", "input": "7 10\n..........\n......*...\n....**..*.\n...**.....\n...*......\n..........\n..**.*....\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "3 9\n.........\n......*..\n.........\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "5 5\n....*\n....*\n....*\n..*..\n..*.*\n", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nComplete the function which retu... | [{"input": "20", "output": "[\"Wrong, please enter a number between 1 and 7\"]", "fn_name": "whatday"}, {"input": "0", "output": "[\"Wrong, please enter a number between 1 and 7\"]", "fn_name": "whatday"}, {"input": "8", "output": "[\"Wrong, please enter a number between 1 and 7\"]", "fn_name": "whatday"}, {"input": "4... | 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 a member of the space st... | [{"type": "stdin_stdout", "input": "3\n10.428063836405636 10.000 50.41258054211165 10.000\n40.000 10.67607738240928 53.01420883969367 10.791354692497457\n40.998260752412115 40.51646067399203 50.343828752057796 10.89540561727416\n2\n30.571866538226903 30.21421585553614 30.992025805702255 20.557461946050214\n40.000 40.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\nFor a given two numbers your mis... | [{"input": "220221\n282224", "output": "[\"deficient abundant not amicable\"]", "fn_name": "deficiently_abundant_amicable_numbers"}, {"input": "299920\n9284", "output": "[\"abundant deficient not amicable\"]", "fn_name": "deficiently_abundant_amicable_numbers"}, {"input": "999220\n2849", "output": "[\"abundant deficien... | 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\nObesity is cited as the cause of... | [{"type": "stdin_stdout", "input": "1011,50.0,1.60\n1002,60.1,0.70\n1003,60.0,0.80\n1004,80.0,1.71\n1005,90.0,1.60", "output": "1002\n1003\n1004\n1005\n"}, {"type": "stdin_stdout", "input": "1011,50.0,1.60\n1102,60.1,0.70\n1003,60.0,0.80\n1004,80.0,1.71\n1005,80.0,1.60", "output": "1102\n1003\n1004\n1005\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\nOn her way to programming school... | [{"type": "stdin_stdout", "input": "100 100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 101\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "110 111\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "111 111\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an integer `n`, find two i... | [{"input": "15569047737", "output": "[144]", "fn_name": "solve"}, {"input": "2452148459", "output": "[116]", "fn_name": "solve"}, {"input": "50000000", "output": "[68]", "fn_name": "solve"}, {"input": "1140", "output": "[33]", "fn_name": "solve"}, {"input": "7019", "output": "[35]", "fn_name": "solve"}, {"input": "18",... | 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\nTakahashi is going to set a 3-ch... | [{"type": "stdin_stdout", "input": "-109", "output": "-1295029\n"}, {"type": "stdin_stdout", "input": "-61", "output": "-226981\n"}, {"type": "stdin_stdout", "input": "-57", "output": "-185193\n"}, {"type": "stdin_stdout", "input": "-68", "output": "-314432\n"}, {"type": "stdin_stdout", "input": "-95", "output": "-8573... | 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 sequence of numbers a1, ... | [{"type": "stdin_stdout", "input": "7\n-4\n-4\n6\n14\n15\n-8\n-14\n13\n1\n0\n3\n2\n-3\n-1\n1\n1\n5\n3\n0\n-6\n2\n3\n1100\n-200\n145\n0", "output": "35\n12\n1100\n"}, {"type": "stdin_stdout", "input": "7\n-5\n-4\n6\n8\n15\n-6\n-12\n13\n1\n2\n3\n2\n-2\n-1\n1\n1\n3\n2\n0\n-4\n2\n3\n1100\n-200\n145\n0", "output": "29\n12\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\nBankopolis is an incredible city... | [{"type": "stdin_stdout", "input": "10 7\n50\n4 7 655\n7 3 220\n3 5 15\n5 10 811\n10 1 490\n1 2 800\n7 10 200\n1 5 377\n1 4 656\n6 4 432\n3 7 563\n1 8 122\n2 9 777\n3 2 157\n5 8 912\n9 8 496\n9 2 740\n3 2 201\n6 7 653\n1 7 554\n6 9 660\n3 2 622\n6 10 227\n9 1 42\n2 6 346\n2 7 944\n3 10 654\n5 2 501\n1 6 786\n3 8 306\n6... | 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 A balls with the string ... | [{"type": "stdin_stdout", "input": "abcdeabcde opqrsopqrs\n7 2\nabcdeabcde\n", "output": "6 2\n"}, {"type": "stdin_stdout", "input": "airport door\n5 5\nairport\n", "output": "4 5\n"}, {"type": "stdin_stdout", "input": "length depth\n3 1\nlength\n", "output": "2 1\n"}, {"type": "stdin_stdout", "input": "tea coffee\n4 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\nSolve the following coding problem using the programming language python:\n\nCreate a function that takes a p... | [{"input": "59884848459853", "output": "[59884848483559]", "fn_name": "next_bigger"}, {"input": "1234567890", "output": "[1234567908]", "fn_name": "next_bigger"}, {"input": "123456789", "output": "[123456798]", "fn_name": "next_bigger"}, {"input": "9876543210", "output": "[-1]", "fn_name": "next_bigger"}, {"input": "99... | 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 Bob have participated ... | [{"input": "[47, 7, 2]\n[47, 7, 2]", "output": "[\"0, 0: that looks like a \\\"draw\\\"! Rock on!\"]", "fn_name": "solve"}, {"input": "[5, 6, 7]\n[3, 6, 10]", "output": "[\"1, 1: that looks like a \\\"draw\\\"! Rock on!\"]", "fn_name": "solve"}, {"input": "[47, 50, 22]\n[26, 47, 12]", "output": "[\"3, 0: Alice made \\\... | 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\nLet \\mathrm{popcount}(n) be the... | [{"type": "stdin_stdout", "input": "23\n00110111001011011001111", "output": "3\n3\n2\n2\n3\n3\n2\n3\n3\n3\n2\n2\n3\n2\n2\n2\n2\n3\n2\n3\n3\n3\n2\n"}, {"type": "stdin_stdout", "input": "23\n00110111001011011101111", "output": "4\n4\n3\n3\n4\n3\n3\n3\n4\n4\n3\n4\n3\n3\n4\n3\n3\n3\n4\n3\n3\n3\n2\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\nRead problems statements in Russ... | [{"type": "stdin_stdout", "input": "CHEFCHEFFFF\n", "output": "2"}, {"type": "stdin_stdout", "input": "CIEFCHEFFFF", "output": "1\n"}, {"type": "stdin_stdout", "input": "BHHHEEFFFCC", "output": "0\n"}, {"type": "stdin_stdout", "input": "CHEFCHEFGFF", "output": "2\n"}, {"type": "stdin_stdout", "input": "CHHHEEFFFCC", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nF: Grid number\n\nproblem\n\nEbi... | [{"type": "stdin_stdout", "input": "8 10 37", "output": "24\n"}, {"type": "stdin_stdout", "input": "5 4 11", "output": "10\n"}, {"type": "stdin_stdout", "input": "5 3 17", "output": "16\n"}, {"type": "stdin_stdout", "input": "5 4 18", "output": "14\n"}, {"type": "stdin_stdout", "input": "8 6 37", "output": "21\n"}, {"t... | 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 two main kinds of even... | [{"type": "stdin_stdout", "input": "10 1 1 1 2 0 10\n1 1\n2 1\n3 0\n4 0\n5 1\n6 1\n14 1\n8 1\n9 1\n10 1\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10 1 1 1 2 0 10\n1 1\n2 1\n3 0\n4 0\n5 1\n6 1\n7 1\n8 1\n9 1\n10 1\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10 1 1 1 2 0 10\n1 1\n2 1\n3 0\n4 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\nThe goddess of programming is re... | [{"type": "stdin_stdout", "input": "14\n04/21 09:00 I 000\n04/21 09:00 I 001\n04/21 09:15 I 002\n04/21 90:30 O 001\n04/21 09:45 O 000\n12/40 10:00 O 002\n04/28 09:00 I 003\n04/28 09:15 I 000\n04/28 09:30 I 004\n04/28 09:45 P 004\n04/28 10:00 O 000\n04/28 10:15 O 003\n04/29 20:00 I 002\n04/29 21:30 O 002\n20\n06/01 09: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\nLittle Vasya had n boxes with ba... | [{"type": "stdin_stdout", "input": "48 19\n227460648 746912227 51958075 682685526 1080381698 666833118 492590399 167395932 678377837 125106811 638633256 713194370 386921921 34175133 704550052 220688092 499436761 495071386 57379330 137372655 0 720974146 209203457 946682102 237312198 943872065 957150897 357568282 3670067... | 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\nLet's introduce a number system ... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "48999999753\n"}, {"type": "stdin_stdout", "input": "1000000001\n", "output": "48999999802\n"}, {"type": "stdin_stdout", "input": "1897400395\n", "output": "92972619108\n"}, {"type": "stdin_stdout", "input": "1100000001\n", "output": "53899999802\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\nYou are given a positive integer... | [{"type": "stdin_stdout", "input": "20 1000000000\n667066860 170421783 139902912 635488786 31946329 289281524 541340760 264115900 680775010 102068388 128171043 636359373 477042326 879154458 716982402 654668379 256334407 874949294 737194458 663371809\n688973261 813186249 677241392 581016678 216137209 424019643 428224807... | 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\nImagine you have an infinite 2D ... | [{"type": "stdin_stdout", "input": "18855321\n", "output": "106661800\n"}, {"type": "stdin_stdout", "input": "34609610\n", "output": "195781516\n"}, {"type": "stdin_stdout", "input": "40000000\n", "output": "226274168\n"}, {"type": "stdin_stdout", "input": "38450759\n", "output": "217510336\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\nWrite a function that takes a po... | [{"input": "123", "output": "[58155876]", "fn_name": "sum_cubes"}, {"input": "10", "output": "[3025]", "fn_name": "sum_cubes"}, {"input": "4", "output": "[100]", "fn_name": "sum_cubes"}, {"input": "3", "output": "[36]", "fn_name": "sum_cubes"}, {"input": "1", "output": "[1]", "fn_name": "sum_cubes"}, {"input": "2", "ou... | 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\nPolycarpus participates in a com... | [{"type": "stdin_stdout", "input": "284254589153928171911281811000\n1009 1000\n", "output": "YES\n2842545891539\n28171911281811000\n"}, {"type": "stdin_stdout", "input": "284254589153928171911281811000\n1009 1100\n", "output": "YES\n2842545891539\n28171911281811000\n"}, {"type": "stdin_stdout", "input": "28425458915392... | 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\nAtCoder Inc. has decided to lock... | [{"type": "stdin_stdout", "input": "19\n5546189040285140044", "output": "273\n"}, {"type": "stdin_stdout", "input": "19\n4753841743850076999", "output": "311\n"}, {"type": "stdin_stdout", "input": "19\n9039528710159876563", "output": "412\n"}, {"type": "stdin_stdout", "input": "19\n3616863455241776042", "output": "322\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMiki is a high school student. S... | [{"type": "stdin_stdout", "input": "15 -1 0\n3.507493431634293\n1.3168078857315408\n0.8923013066938583", "output": "-5115018.0145617081\n"}, {"type": "stdin_stdout", "input": "15 -1 0\n2.5963136238190727\n1.3168078857315408\n0.4906502505511706", "output": "1186.1864007578\n"}, {"type": "stdin_stdout", "input": "15 -1 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\nBob is about to take a hot bath.... | [{"type": "stdin_stdout", "input": "1000000 1000000 1000000 1000000 1000000\n", "output": "1000000 1000000\n"}, {"type": "stdin_stdout", "input": "1000000 1000000 999999 999998 1000000\n", "output": "999999 999998\n"}, {"type": "stdin_stdout", "input": "176902 1481077 847541 412251 587604\n", "output": "616526 283398\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\nVasya plays a computer game with... | [{"type": "stdin_stdout", "input": "001 1\n----------------------------------------------------------------------------------------------------X\n----------------------------------------------------------------------------------------------------X\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "011 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\nGru has not been in the limeligh... | [{"type": "stdin_stdout", "input": "1\n5 10\n2 4 1 35 1\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1\n4 2\n-1 8 1 -1 -1", "output": "0\n"}, {"type": "stdin_stdout", "input": "1\n5 10\n2 4 1 62 1", "output": "1\n"}, {"type": "stdin_stdout", "input": "1\n5 20\n2 4 1 62 1", "output": "2\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\nGiven an array $a$ of length $n$... | [{"type": "stdin_stdout", "input": "10\n1 2 3 4 4 4 7 7 7 10\n", "output": "0 1 2 3 5 6 4 8 9 7 "}, {"type": "stdin_stdout", "input": "10\n1 2 3 4 4 4 7 7 7 10\n", "output": "0 1 2 3 5 6 4 8 9 7\n"}, {"type": "stdin_stdout", "input": "7\n0 0 2 2 3 5 6\n", "output": "1 4 0 7 2 3 5 \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\nAn `non decreasing` number is on... | [{"input": "50", "output": "[12565671261]", "fn_name": "increasing_numbers"}, {"input": "20", "output": "[10015005]", "fn_name": "increasing_numbers"}, {"input": "10", "output": "[92378]", "fn_name": "increasing_numbers"}, {"input": "5", "output": "[2002]", "fn_name": "increasing_numbers"}, {"input": "6", "output": "[5... | 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\nThere is unrest in the Galactic ... | [{"type": "stdin_stdout", "input": "6 6\n1 1 3 2 2 2\n1 0 0 1 0 0\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "6 6\n4 3 5 4 5 2\n0 1 0 1 2 0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "6 6\n1 1 3 2 2 2\n1 0 0 0 0 0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "6 6\n4 3 5 6 5 5\n0 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\nThe magic sum of 3s is calculate... | [{"input": "[3, 12, 5, 8, 30, 13]", "output": "[16]", "fn_name": "magic_sum"}, {"input": "[30, 34, 330]", "output": "[0]", "fn_name": "magic_sum"}, {"input": "[3, 13]", "output": "[16]", "fn_name": "magic_sum"}, {"input": "null", "output": "[0]", "fn_name": "magic_sum"}, {"input": "[3]", "output": "[3]", "fn_name": "ma... | 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\nLimak is a little bear who loves... | [{"type": "stdin_stdout", "input": "170\n1 2 1 2 1 1 1 1 2 3 2 1 1 2 2 1 2 1 2 1 1 2 3 3 2 1 1 1 1 1 1 1 1 2 1 2 3 3 2 1 2 2 1 2 3 2 1 1 2 3 2 1 2 1 1 1 2 3 3 2 1 2 1 2 1 1 1 2 1 2 1 1 2 2 1 1 2 1 2 2 1 2 1 2 2 1 2 1 2 3 2 1 1 2 3 4 4 3 2 1 2 1 2 1 2 3 3 2 1 2 1 1 1 1 1 1 1 2 2 1 1 2 1 1 1 1 2 1 1 2 3 2 1 2 2 1 2 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\nYou are given an integer sequenc... | [{"type": "stdin_stdout", "input": "2000000000\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1999999999\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1999999997\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1999999998\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000271094\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\nSaitama accidentally destroyed a... | [{"type": "stdin_stdout", "input": "100 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\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\nAndrew, Fedor and Alex are inven... | [{"type": "stdin_stdout", "input": "5 12\nabas\ndsfdf\nabacaba\ndartsidius\nkolobok\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "5 6\nabas\ndsfdf\nabacaba\ndartsidius\nkolobok\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "3 3\nabasdfabab\nabaaasdfdsf\nasdfaba\n", "output": "Second\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\n\nJohn has an important ... | [{"input": "\"TTONWOHREEE\"", "output": "[\"123\"]", "fn_name": "original_number"}, {"input": "\"ONETWO\"", "output": "[\"12\"]", "fn_name": "original_number"}, {"input": "\"OONETW\"", "output": "[\"12\"]", "fn_name": "original_number"}, {"input": "\"ONE\"", "output": "[\"1\"]", "fn_name": "original_number"}, {"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\nSolve the following coding problem using the programming language python:\n\nA long time ago (probably even i... | [{"type": "stdin_stdout", "input": "911 728 910 407 833 594\n", "output": "Hermione\n"}, {"type": "stdin_stdout", "input": "632 446 352 317 522 451\n", "output": "Hermione\n"}, {"type": "stdin_stdout", "input": "542 11 820 850 1201 738\n", "output": "Hermione\n"}, {"type": "stdin_stdout", "input": "911 728 910 180 833 ... | 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 sequences A and B ... | [{"type": "stdin_stdout", "input": "3\n11 3\n-1 1\n2 8", "output": "9\n"}, {"type": "stdin_stdout", "input": "3\n8 3\n0 1\n4 8\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "3\n8 3\n-1 1\n5 8", "output": "9\n"}, {"type": "stdin_stdout", "input": "3\n8 3\n-1 0\n4 8", "output": "8\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\n-----Input-----\n\nThe only line... | [{"type": "stdin_stdout", "input": "4357087936\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "3333333333\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "806975480\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "4357087936\n", "output": "YES"}, {"type": "stdin_stdout", "input": "3333333... | 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 animals in the queue... | [{"type": "stdin_stdout", "input": "150 2476\n70 21 114 127 22 11 29 59 51 59 35 3 53 88 5 8 44 4 8 100 1 27 1 25 27 56 48 22 23 103 85 66 14 58 20 7 176 11 19 26 105 97 83 3 29 30 52 92 59 11 135 37 59 8 66 20 47 19 143 16 93 18 57 71 1 13 141 1 119 6 2 87 40 68 28 22 20 53 31 19 15 33 32 9 70 63 16 26 77 7 45 52 73 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\nPetya loves lucky numbers very m... | [{"type": "stdin_stdout", "input": "44447774444474477747774774477777474774744744477444447777477477744747477774744444744777777777747777477447744774744444747477744744\n77777474477477747774777777474474477444474777477747747777477747747744474474747774747747444777474444744744444477477777747744747477\n", "output": "37\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\nVasya has a string $s$ of length... | [{"type": "stdin_stdout", "input": "1\n440\ntcjbjlbtjfmvzdqutuwzvmgqrqtrvxwrdacxcowbmbwvwssihttgdsjntiawqavwspzmybakxmwpbcgaffpyhvjrulqsorkcuozvtdbkkmasxtemrrbhqnmkpgewwphdvcyhxmatrfjkesacujihmtyqtqcjfqhpsjhgzimegvkjylapylqprykvkjavlmipewlzqsfefjzecadsqmfutgnegngmwchqttcyklocfcyuhghvtygdbsxaoxkvtgdcnsqddzzakhgrribwxkua... | 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 concept of \"[smooth number]... | [{"input": "3125", "output": "[\"Hamming number\"]", "fn_name": "is_smooth"}, {"input": "60", "output": "[\"Hamming number\"]", "fn_name": "is_smooth"}, {"input": "98", "output": "[\"humble number\"]", "fn_name": "is_smooth"}, {"input": "4096", "output": "[\"power of 2\"]", "fn_name": "is_smooth"}, {"input": "7", "outp... | 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 guessed a permutation $p$ con... | [{"type": "stdin_stdout", "input": "5\n6\n3 2 5 6\n2 4 6\n3 1 3 4\n2 1 3\n4 1 2 4 6\n5\n2 2 3\n2 1 2\n2 1 4\n2 4 5\n7\n3 1 2 6\n4 1 3 5 6\n2 1 2\n3 4 5 7\n6 1 2 3 4 5 6\n3 1 3 6\n2\n2 1 2\n5\n2 2 5\n3 2 3 5\n4 2 3 4 5\n5 1 2 3 4 5\n", "output": "3 1 4 6 2 5 \n3 2 1 4 5 \n2 1 6 3 5 4 7 \n1 2 \n2 5 3 4 1 \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\nYou have to create a function na... | [{"input": "[1, 2, 3]", "output": "[[1, 2, 3]]", "fn_name": "reverse_it"}, {"input": "\"314159\"", "output": "[\"951413\"]", "fn_name": "reverse_it"}, {"input": "\"Hello\"", "output": "[\"olleH\"]", "fn_name": "reverse_it"}, {"input": "314159", "output": "[951413]", "fn_name": "reverse_it"}, {"input": "true", "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\nKristina has two arrays $a$ and ... | [{"type": "stdin_stdout", "input": "6\n4\n3 5 4 1\n1 3 2 0\n3\n1 2 1\n0 1 0\n4\n5 3 7 2\n1 1 1 1\n5\n1 2 3 4 5\n1 2 3 4 6\n1\n8\n0\n1\n4\n6\n", "output": "YES\nYES\nNO\nNO\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "1\n4\n8293 8293 1 8\n8293 8293 1 8\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1\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\nSolve the following coding problem using the programming language python:\n\nYou have a multiset containing s... | [{"type": "stdin_stdout", "input": "20\n1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "20\n1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "20\n1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 3\n", "output": "11\n"}, {"type": "std... | 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 function that accepts tw... | [{"input": "\"hello, how, are, you, doing, today\"\n3", "output": "[\"today, are, doing, hello, you, how\"]", "fn_name": "sort_it"}, {"input": "\"zephyr, yellow, wax, a, ba, cat\"\n1", "output": "[\"a, ba, cat, wax, yellow, zephyr\"]", "fn_name": "sort_it"}, {"input": "\"words, wordz, wordy, wording\"\n5", "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\nInna loves sweets very much. Tha... | [{"type": "stdin_stdout", "input": "50 37 500\n", "output": "10544\n(1,1) (2,1) (3,1) (4,1) (4,2) (4,3) (4,4) (4,5) (4,6) (4,7) (4,8) (4,9) (4,10) (4,11) (4,12) (4,13) (4,14) (4,15) (4,16) (4,17) (4,18) (4,19) (4,20) (4,21) (4,22) (4,23) (4,24) (4,25) (4,26) (4,27) (4,28) (4,29) \n(1,1) (2,1) (3,1) (3,2) (3,3) (3,4) (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\nSolve the following coding problem using the programming language python:\n\nLong ago, Vasily built a good fe... | [{"type": "stdin_stdout", "input": "50\n1 3083990 976356336 922018335 1 170272482 1 547248035 1 1 1 1 1 928379588 1 1 1 270052499 315045369 1 1 556091215 1 655608230 424079072 1 1 185387009 77360256 1 1 942696777 228860271 1 487787709 1 437229749 167886535 1 1 904578415 319694007 1 313704390 1 1 957736320 771147030 458... | 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 string $s$, cons... | [{"type": "stdin_stdout", "input": "25\nbbaaaaabaaaabbabaaaababaa\n", "output": "YES\nba\n"}, {"type": "stdin_stdout", "input": "25\nbbaaaaabaaaabbabaaaababaa\n", "output": "YES\nba\n"}, {"type": "stdin_stdout", "input": "25\nbbaaaaabaaaabbabaaaabab`a\n", "output": "YES\nba\n"}, {"type": "stdin_stdout", "input": "25\nb... | 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\nNot so long ago as a result of c... | [{"type": "stdin_stdout", "input": "1000 -1000\n", "output": "white\n"}, {"type": "stdin_stdout", "input": "0000 -1000\n", "output": "black\n"}, {"type": "stdin_stdout", "input": "-1059 -929\n", "output": "black\n"}, {"type": "stdin_stdout", "input": "-215 -996\n", "output": "black\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\nSeryozha has a very changeable c... | [{"type": "stdin_stdout", "input": "7\ni\nam\nont\nmain\nin\nthe\nfamily\n<3i<>3am<3the<3<main<3in<3the<3><3family<3\n", "output": "no\n"}, {"type": "stdin_stdout", "input": "7\ni\nam\nont\nmbin\nin\nthe\nfamily\n<3i<>3am<3the<3<main<3in<3the<3><3fami... | 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\nEverybody knows that the Berland... | [{"type": "stdin_stdout", "input": "2000\naabaaabaabababbbbbbabbbbb\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2000\naabaaabaabababbbbbbabbbbb\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2000\naaaaaabaabababbbbbbabbbbb\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2000\naaaaaabaaba... | 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 simple function that tak... | [{"input": "1090\n10000", "output": "[[9848.0775301221, 1736.4817766693]]", "fn_name": "coordinates"}, {"input": "45\n1", "output": "[[0.7071067812, 0.7071067812]]", "fn_name": "coordinates"}, {"input": "-270\n1", "output": "[[0.0, 1.0]]", "fn_name": "coordinates"}, {"input": "90\n1", "output": "[[0.0, 1.0]]", "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\nA binary tree of n nodes is give... | [{"type": "stdin_stdout", "input": "50 50\navzqjbotzkdbrhpknuxxcndqnnkfpthvjriridgnocygczqeyy\n3 50\n0 0\n24 47\n0 0\n0 0\n0 36\n0 0\n42 0\n0 0\n0 0\n0 0\n2 9\n40 0\n0 0\n0 0\n0 0\n20 0\n5 0\n11 32\n0 0\n8 30\n0 34\n0 0\n17 21\n0 0\n0 0\n23 38\n15 39\n0 13\n19 0\n0 7\n10 14\n0 0\n4 41\n48 44\n33 27\n29 0\n0 0\n0 37\n0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIahub recently has learned Bubbl... | [{"type": "stdin_stdout", "input": "100\n36 48 92 87 28 85 42 10 44 41 39 3 79 9 14 56 1 16 46 35 93 8 82 26 100 59 60 2 96 52 13 98 70 81 71 94 54 91 17 88 33 30 19 50 18 73 65 29 78 21 61 7 99 97 45 89 57 27 76 11 49 72 84 69 43 62 4 22 75 6 66 83 38 34 86 15 40 51 37 74 67 31 20 63 77 80 12 53 5 25 58 90 68 24 64 23... | 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\nI decided to do bowling as a rec... | [{"type": "stdin_stdout", "input": "3\n1010 6 3 10 10 1 0 7 9 1 10 6 2 4 3 9 1 9 0\n1200 5 3 9 1 12 1 0 0 12 1 10 10 4 3 9 1 8 2 9\n1101 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3\n4\n3321 8 2 10 9 1 7 0 10 10 10 0 8 10 10 10 10\n3332 5 0 10 13 1 4 1 9 0 10 10 7 1 5 2 8 1\n3335 10 10 10 10 10 10 10 10 10 10 10 10\n3340 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\nYou are given a huge integer $a$... | [{"type": "stdin_stdout", "input": "3\n0709\n1337\n246432\n", "output": "0079\n1337\n234642\n"}, {"type": "stdin_stdout", "input": "3\n0709\n1337\n246432\n", "output": "0079\n1337\n234642\n"}, {"type": "stdin_stdout", "input": "3\n477\n1337\n246432\n", "output": "477\n1337\n234642\n"}, {"type": "stdin_stdout", "input":... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.