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\nYou are the head of a large ente...
[{"type": "stdin_stdout", "input": "3\n3 26\n10 12\n1 4\n13 26\n1 1337\n-1 1000000001\n5 26\n4 3\n1 4\n3 7\n2 12\n2 14\n", "output": "12\n1337\n7\n"}, {"type": "stdin_stdout", "input": "3\n3 25\n10 12\n1 4\n10 13\n1 1337\n1 1000000001\n5 26\n4 3\n0 4\n3 11\n2 12\n2 14\n", "output": "12\n1337\n7\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\nValery is very interested in mag...
[{"type": "stdin_stdout", "input": "150\n0 -2 1 -2 0 0 0 0 -2 0 -2 -1 0 0 2 0 1 -2 1 -1 0 0 0 2 -2 2 -1 0 0 0 -2 0 2 0 1 0 -2 0 -2 -1 -1 -2 -2 2 0 0 1 -2 -2 -1 -2 0 2 1 1 -1 1 0 -2 2 0 0 0 1 -1 0 -2 -1 0 -2 2 1 1 0 0 2 0 0 2 -1 0 0 2 0 2 0 -2 -1 1 -2 1 0 0 -2 -1 -1 0 0 2 -1 -1 -1 -1 -2 0 0 2 -1 -1 1 0 0 1 -1 0 0 -1 2 2...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day Anna got the following t...
[{"type": "stdin_stdout", "input": "50\n363510947 363510954 363510943 363510964 363510969 363510950 363510951 363510960 363510967 363510952 363510956 363510948 363510944 363510946 363510965 363510946 363510963 363510962 363510947 363510955 363510954 363510948 363510961 363510964 363510963 363510945 363510965 363510953 ...
code_stdio
[ { "content": "You are an expert Python programmer. 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\nToday, the memorable AtCoder Beg...
[{"type": "stdin_stdout", "input": "9 1", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "6 40", "output": "40000000000000\n"}, {"type": "stdin_stdout", "input": "7 1", "output": "100000000000000\n"}, {"type": "stdin_stdout", "input": "4 40", "output": "4000000000\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\n## Task\n An `ATM` ran out of 10...
[{"input": "250", "output": "[[2, 1, 0]]", "fn_name": "withdraw"}, {"input": "260", "output": "[[2, 0, 3]]", "fn_name": "withdraw"}, {"input": "230", "output": "[[1, 1, 4]]", "fn_name": "withdraw"}, {"input": "40", "output": "[[0, 0, 2]]", "fn_name": "withdraw"}, {"input": "60", "output": "[[0, 0, 3]]", "fn_name": "wit...
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\nWilbur is playing with a set of ...
[{"type": "stdin_stdout", "input": "40\n0 0\n0 1\n0 2\n0 3\n0 4\n0 5\n0 6\n0 7\n0 8\n0 9\n0 10\n0 11\n0 12\n1 0\n1 1\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n2 0\n3 0\n4 0\n5 0\n6 0\n7 0\n8 0\n9 0\n10 0\n11 0\n12 0\n13 0\n14 0\n15 0\n16 0\n17 0\n18 0\n19 0\n20 0\n0 1 2 -1 -2 3 4 -3 5 6 7 8 0 -4 -5 1 -6 -7 -8 -9 -10 -11 9 2 -12 -...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day Vasya was sitting on a n...
[{"type": "stdin_stdout", "input": "1000000000000 999999999999\n", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000 999999999999\n", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000 999999999998\n", "output": "500000000000\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\nLittle Petya likes arrays that c...
[{"type": "stdin_stdout", "input": "99\n3511 2076 9314 3598 7737 271 4110 4454 5830 8661 8584 8227 2236 2626 1025 3806 3162 2837 6071 9627 1836 7729 6629 4054 9377 3261 1325 8859 3610 7616 5052 9736 1249 6224 7031 6074 4196 8075 4005 5419 5664 8214 4391 731 8714 8622 6122 6976 4057 1770 8025 3778 2792 994 5204 1826 608...
code_stdio
[ { "content": "You are an expert Python programmer. 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 bus stop near the uni...
[{"type": "stdin_stdout", "input": "32 5\n15 12\n24 6\n30 13\n35 7\n38 6\n46 6\n47 12\n60 6\n66 9\n71 26\n74 6\n76 15\n104 6\n105 6\n110 15\n124 12\n126 12\n129 9\n131 12\n134 15\n135 15\n141 12\n154 13\n167 9\n171 9\n179 17\n181 15\n185 12\n189 12\n191 6\n192 6\n196 12\n", "output": "53 44 55 47 44 77 86 77 82 101 134...
code_stdio
[ { "content": "You are an expert Python programmer. 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 wise man told Kerem \"Differen...
[{"type": "stdin_stdout", "input": "45\naaabbbcccdddeeefffgghhiijjkkkkkkkkkkkkkkkkkkk\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "45\naaabbbcccdddeeefffgghhiijjkkkkkkkkkkkkkkkkkkk\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "45\naaabbbcccdedeeefffgghhiijjkkkkkkkkkkkkkkkkkkk\n", "output": "-1\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice is the leader of the State...
[{"type": "stdin_stdout", "input": "100\n100 48 48 22 21 27 51 43 53 34 54 37 45 37 27 53 39 53 37 44 55 44 31 36 55 47 45 23 40 32 55 54 40 38 30 25 28 20 39 20 53 50 41 26 29 37 42 55 23 27 51 30 39 50 24 30 22 50 56 32 60 45 50 43 27 25 52 59 47 58 28 56 49 39 33 52 26 46 23 42 45 58 42 50 49 25 28 30 46 43 26 32 40...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n**Introduction**\n Little Petya ...
[{"input": "[5, 6, 1, 2, 3, 1, 3, 45, 7, 1000000000]", "output": "[[1, 1, 1, 2, 3, 3, 5, 6, 7, 45]]", "fn_name": "sort_number"}, {"input": "[1, 2, 3, 4, 5]", "output": "[[1, 1, 2, 3, 4]]", "fn_name": "sort_number"}, {"input": "[4, 2, 1, 3, 5]", "output": "[[1, 1, 2, 3, 4]]", "fn_name": "sort_number"}, {"input": "[2, 3,...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPlaying with Stones\n\nKoshiro a...
[{"type": "stdin_stdout", "input": "4\n24 99\n15 68\n12 155\n95 79", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n24 99\n15 97\n12 149\n95 79", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n39 99\n15 97\n12 149\n95 79", "output": "0\n"}, {"type": "stdin_stdout", "input": "4\n24 99\n15 68\n12 90\n95...
code_stdio
[ { "content": "You are an expert Python programmer. 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**This Kata is intended as a sma...
[{"input": "\"hello world\"\n\"o\"", "output": "[2]", "fn_name": "str_count"}, {"input": "\"codewars\"\n\"c\"", "output": "[1]", "fn_name": "str_count"}, {"input": "\"hello\"\n\"l\"", "output": "[2]", "fn_name": "str_count"}, {"input": "\"hello\"\n\"e\"", "output": "[1]", "fn_name": "str_count"}, {"input": "\"ggggg\"\n...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ of $n...
[{"type": "stdin_stdout", "input": "4\n4 1\n3 0 1 2\n4 1\n0 2 4 5\n7 2\n4 13 0 0 13 1337 1000000000\n6 2\n1 2 8 0 0 0\n", "output": "0\n1\n2\n0\n"}, {"type": "stdin_stdout", "input": "5\n5 1\n1 2 3 4 5\n5 1\n1 2 3 4 5\n5 1\n1 2 3 4 5\n5 1\n1 2 3 4 5\n5 1\n1 2 3 4 5\n", "output": "0\n0\n0\n0\n0\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\nA text editor is a useful softwa...
[{"type": "stdin_stdout", "input": "3\nA sample input\n9\nforward word\ndelete char\nforward word\ndelete char\nforward word\ndelete char\nbackward word\nbackward word\nforward word\nHallow, Word.\n7\nforward char\ndelete word\ninsert \"ello, \"\nforward word\nbackward char\nbackward char\ninsert \"l\"\n\n3\nforward vo...
code_stdio
[ { "content": "You are an expert Python programmer. 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 likes squares and cubes...
[{"type": "stdin_stdout", "input": "20\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n1000000000\n", "output": "32591\n32591\n32591\n32591...
code_stdio
[ { "content": "You are an expert Python programmer. 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, Vlad came up wi...
[{"type": "stdin_stdout", "input": "5\n1 4 3\n5 8 4\n6 10 6\n1 1000000000 1000000000\n10 12 8\n", "output": "2\n4\n5\n999999999\n5\n"}, {"type": "stdin_stdout", "input": "3\n1 100 54\n1 100 55\n1 100 56\n", "output": "53\n54\n55\n"}, {"type": "stdin_stdout", "input": "1\n6 999998 9\n", "output": "111118\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\nMr. Chanek has an integer repres...
[{"type": "stdin_stdout", "input": "________\n", "output": "3600000\n"}, {"type": "stdin_stdout", "input": "X_______\n", "output": "3600000\n"}, {"type": "stdin_stdout", "input": "_____X__\n", "output": "3600000\n"}, {"type": "stdin_stdout", "input": "_______X\n", "output": "3600000\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\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "2\n1\n1 0\n2\n10 -1 -1", "output": "0\n999999949\n"}, {"type": "stdin_stdout", "input": "2\n1\n2 4\n2\n1 -1 1", "output": "16\n1000000003\n"}, {"type": "stdin_stdout", "input": "2\n1\n1 2\n2\n1 -1 0", "output": "4\n1000000003\n"}, {"type": "stdin_stdout", "input": "2\n1\n1 2\n2\n1 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\nAizu Gakuen High School holds a ...
[{"type": "stdin_stdout", "input": "1a 132 243\n1c 324 183\n1f 93 199\n2b 372 163\n2c 229 346\n2e 391 206\n3a 118 168\n3b 263 293\n3d 281 102", "output": "1a 375 99300\n1c 507 119700\n1f 292 78300\n2b 535 123300\n2c 575 149600\n2e 597 140000\n3a 286 74000\n3b 556 140500\n3d 383 86800\n"}, {"type": "stdin_stdout", "inpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya is preparing for his birth...
[{"type": "stdin_stdout", "input": "4\n4\n3 7 4 5\n2 1 2 4\n4\n1 2 3 4\n3 3 3 3\n2\n1 2\n10 10\n2\n10 10\n1 2\n", "output": "5\n3\n2\n3\n"}, {"type": "stdin_stdout", "input": "4\n4\n3 11 4 2\n2 1 2 4\n4\n1 2 3 4\n3 3 3 3\n2\n1 2\n10 10\n2\n10 10\n1 2\n", "output": "3\n3\n2\n3"}, {"type": "stdin_stdout", "input": "4\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\nThere are some stones on Bob's t...
[{"input": "\"GBRGGRBBBBRRGGGB\"", "output": "[7]", "fn_name": "solution"}, {"input": "\"BGRBBGGBRRR\"", "output": "[4]", "fn_name": "solution"}, {"input": "\"GBBBGGRRGRB\"", "output": "[4]", "fn_name": "solution"}, {"input": "\"RRGGBB\"", "output": "[3]", "fn_name": "solution"}, {"input": "\"RGBRGB\"", "output": "[0]"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor years, the Day of city N was...
[{"type": "stdin_stdout", "input": "100 7 7\n1656 322 975 921 115 647 61 232 127 277 839 797 261 968 788 381 191 117 663 959 475 166 471 984 17 473 57 809 65 881 1109 725 587 933 466 537 1017 706 927 173 636 372 644 82 835 893 792 494 808 977 479 109 1858 21 625 104 626 569 524 504 16 257 274 285 404 629 247 609 521 60...
code_stdio
[ { "content": "You are an expert Python programmer. 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 points on a plan...
[{"type": "stdin_stdout", "input": "20\n0 17\n1 8\n1 9\n2 5\n2 11\n3 0\n5 10\n5 13\n6 7\n7 3\n12 13\n13 7\n14 16\n15 10\n15 18\n17 2\n17 12\n18 14\n19 18\n20 17\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "20\n0 17\n1 8\n1 9\n2 5\n2 11\n3 0\n5 10\n5 13\n6 7\n7 3\n12 13\n13 7\n14 16\n15 10\n15 18\n17 2\n17 ...
code_stdio
[ { "content": "You are an expert Python programmer. 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 well-known art union called \"...
[{"type": "stdin_stdout", "input": "10 3\n6 10 3\n2 7 12\n7 4 7\n10 3 2\n6 5 12\n8 4 4\n5 9 11\n6 7 7\n2 6 10\n2 6 2\n", "output": "19 35 42 44 56 60 71 78 88 90\n"}, {"type": "stdin_stdout", "input": "10 3\n6 10 3\n2 7 12\n7 4 7\n6 3 0\n6 5 12\n8 4 4\n5 15 11\n6 7 3\n2 6 10\n2 6 2\n", "output": "19 35 42 42 54 58 69 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\nFor some reason in many American...
[{"type": "stdin_stdout", "input": "90\n1 1\n2 1\n3 1\n4 1\n5 1\n6 1\n7 1\n8 1\n9 1\n1 2\n2 2\n3 2\n4 2\n5 2\n6 2\n7 2\n8 2\n9 2\n1 3\n2 3\n3 3\n4 3\n5 3\n6 3\n7 3\n8 3\n9 3\n1 4\n2 4\n3 4\n4 4\n5 4\n6 4\n7 4\n8 4\n9 4\n1 5\n2 5\n3 5\n4 5\n5 5\n6 5\n7 5\n8 5\n9 5\n1 6\n2 6\n3 6\n4 6\n5 6\n6 6\n7 6\n8 6\n9 6\n1 7\n2 7\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 a simple weighted ...
[{"type": "stdin_stdout", "input": "15 15 23\n13 10 12\n11 14 12\n2 15 5\n4 10 8\n10 2 4\n10 7 5\n3 10 1\n5 6 11\n1 13 8\n9 15 4\n4 2 9\n11 15 1\n11 12 14\n10 8 12\n3 6 11\n", "output": "3250\n"}, {"type": "stdin_stdout", "input": "15 15 23\n13 11 12\n11 14 12\n2 15 5\n4 10 8\n10 2 4\n10 7 5\n3 10 1\n5 6 11\n1 13 8\n9 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe following problem is well-kn...
[{"type": "stdin_stdout", "input": "100000000\n100000000\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "100000000\n100000000\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "100000000\n100001000\n", "output": "100001000\n"}, {"type": "stdin_stdout", "input": "100000000\n110001000\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\nThe R2 company has n employees w...
[{"type": "stdin_stdout", "input": "7 6 5\n0 1 0 1 1 1\n0 1 1 0 1 1\n1 0 1 1 1 0\n1 0 1 1 1 1\n1 1 1 1 1 0\n1 1 1 0 1 0\n1 0 1 0 0 0\n4 1\n2 6\n7 3\n7 1\n5 3\n", "output": "1 2 4 4 3 4 2 \n"}, {"type": "stdin_stdout", "input": "7 6 5\n0 1 0 1 1 1\n0 1 1 0 1 1\n1 0 1 1 1 0\n1 0 1 1 1 1\n1 1 1 1 1 0\n1 1 1 0 1 0\n1 0 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\nA classroom in a school has six ...
[{"type": "stdin_stdout", "input": "..-**-..\n..-**-..\n..-..-..\n..-..-..\n..-..-..\n..-..-..\n", "output": "..-**-..\n..-**-..\n..-..-..\n..-P.-..\n..-..-..\n..-..-..\n"}, {"type": "stdin_stdout", "input": "**-**-**\n**-**-**\n..-**-.*\n**-**-**\n..-..-..\n..-**-..\n", "output": "**-**-**\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\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\nThere is a vampire family of N m...
[{"type": "stdin_stdout", "input": "2 3\n5 4 5\n1 2 3\n3 2 1\n3 5\n1 2 3 4 5\n0 1 -1 1 2\n-1 1 1 2 2\n1 0 3 1 1\n0 0", "output": "Yes\nYes\n"}, {"type": "stdin_stdout", "input": "2 3\n5 4 5\n1 2 3\n3 2 1\n3 5\n1 2 3 7 5\n0 1 -1 1 2\n-1 1 1 2 2\n1 0 3 1 1\n0 0", "output": "Yes\nYes\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\nLong time ago there was a symmet...
[{"type": "stdin_stdout", "input": "6\n2\n8 12 8 12\n2\n7 7 9 11\n2\n7 11 7 11\n1\n1 1\n4\n40 56 48 40 160 56 117 48\n6\n240 154 210 162 174 154 186 240 174 186 162 210\n", "output": "YES\nNO\nNO\nNO\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "6\n2\n8 12 8 12\n2\n7 7 9 11\n2\n0 11 7 11\n1\n1 1\n4\n40 56 48 40 160 ...
code_stdio
[ { "content": "You are an expert Python programmer. 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 consistin...
[{"type": "stdin_stdout", "input": "100 100\n98 52 63 2 18 96 31 58 84 40 41 45 66 100 46 71 26 48 81 20 73 91 68 76 13 93 17 29 64 95 79 21 55 75 19 85 54 51 89 78 15 87 43 59 36 1 90 35 65 56 62 28 86 5 82 49 3 99 33 9 92 32 74 69 27 22 77 16 44 94 34 6 57 70 23 12 61 25 8 11 67 47 83 88 10 14 30 7 97 60 42 37 24 38 ...
code_stdio
[ { "content": "You are an expert Python programmer. 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 princess is going to escape ...
[{"type": "stdin_stdout", "input": "2\n100\n10\n10\n739\n", "output": "22\n"}, {"type": "stdin_stdout", "input": "1\n100\n1\n1\n1000\n", "output": "152\n"}, {"type": "stdin_stdout", "input": "2\n100\n13\n10\n739\n", "output": "22\n"}, {"type": "stdin_stdout", "input": "1\n100\n2\n1\n1000\n", "output": "151\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\nWrite a function that takes one ...
[{"input": "[1, 3, 2]\n[5, 2, 1, 4]\n[2, 1]", "output": "[[1, 3, 2, 5, 4]]", "fn_name": "unite_unique"}, {"input": "[]\n[1, 2, 1, 2]\n[2, 1, 1, 2, 1]", "output": "[[1, 2]]", "fn_name": "unite_unique"}, {"input": "[]\n[4, \"a\", 2]\n[]", "output": "[[4, \"a\", 2]]", "fn_name": "unite_unique"}, {"input": "[1, 2]\n[3, 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\nKana was just an ordinary high s...
[{"type": "stdin_stdout", "input": "7\n100 3 2\n189 3 4\n28 2 3\n63 2 3\n30 27 14\n10 9 1\n69117 21 2\n", "output": "NO\nNO\nYES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "7\n100 3 2\n189 4 4\n64 2 3\n18 2 3\n19 27 14\n10 9 1\n69117 21 2\n", "output": "NO\nYES\nNO\nYES\nYES\nYES\nYES\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\nQuite recently a creative studen...
[{"type": "stdin_stdout", "input": "100 100 1\n", "output": "988185646\n"}, {"type": "stdin_stdout", "input": "100 50 50\n", "output": "661237556\n"}, {"type": "stdin_stdout", "input": "100 13 11\n", "output": "883875774\n"}, {"type": "stdin_stdout", "input": "90 100 30\n", "output": "697322870\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\n[Image] \n\nAs some of you know,...
[{"type": "stdin_stdout", "input": "53\n1014364 40727 75774 243769 314 406417 5272684 14138 10640282 64955 2763 5667043 2121887 204672692 567643 60183 5183 11361359 2792918 199155 174809 16182540 21 392221 19434423 9140891 159733 15438 67903 3816799 616 429181 30392293 413992581 10847741 20771 16366654 1163 414283 1561...
code_stdio
[ { "content": "You are an expert Python programmer. 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 program that reads poke...
[{"type": "stdin_stdout", "input": "1,2,4,3,1\n3,3,1,3,12\n12,13,11,12,12\n7,6,7,6,7\n3,3,2,3,3\n6,7,8,9,10\n11,13,11,1,13\n11,12,13,1,1", "output": "one pair\nthree card\nthree card\nfull house\nfour card\nstraight\ntwo pair\none pair\n"}, {"type": "stdin_stdout", "input": "1,2,3,4,1\n2,3,1,3,12\n12,13,11,12,12\n7,6,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\nDescription\n\nTHE BY DOLM @ STE...
[{"type": "stdin_stdout", "input": "3 10\nDobkeradops\n7 5 23 10\nPataPata\n1 0 2 1\ndop\n1 7 11 21\n2 300\nBydp System ahplA\n2 11 4 7\nGreen Inferno\n300 300 300 300", "output": "210\n1650\n"}, {"type": "stdin_stdout", "input": "3 10\nDobkeradops\n7 5 23 10\nPataPata\n1 1 2 1\ndop\n1 7 11 14\n2 300\nBydp System Alpha...
code_stdio
[ { "content": "You are an expert Python programmer. 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\nTokitsukaze and CSL are playing ...
[{"type": "stdin_stdout", "input": "14\n9 9 1000 2000 39999 48888 16 32 123456 959658 111 987584 125632 125468\n", "output": "sjfnb\n"}, {"type": "stdin_stdout", "input": "14\n9 9 1000 2000 39999 48888 16 32 123456 959658 111 987584 125632 125477\n", "output": "cslnb\n"}, {"type": "stdin_stdout", "input": "14\n9 9 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 need to create ...
[{"input": "[[20, 50], [10, 10], [50, 20]]", "output": "[1890]", "fn_name": "sum_differences_between_products_and_LCMs"}, {"input": "[[15, 18], [4, 5], [12, 60]]", "output": "[840]", "fn_name": "sum_differences_between_products_and_LCMs"}, {"input": "[[1, 1], [0, 0], [13, 91]]", "output": "[1092]", "fn_name": "sum_diff...
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\nThis is yet another problem on r...
[{"type": "stdin_stdout", "input": "(?(((???))(??)?)?))))(?)????(()()???(?)????(??(??????)()(????(?)))))??(???(??)?(??)????????(????(?()\n39 78\n1 83\n2 35\n28 89\n53 53\n96 67\n16 46\n43 28\n25 73\n8 97\n57 41\n15 25\n47 49\n23 18\n97 77\n38 33\n68 80\n38 98\n62 8\n61 79\n84 50\n71 48\n12 16\n97 95\n16 70\n72 58\n55 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\nThe clique problem is one of the...
[{"type": "stdin_stdout", "input": "12\n66 4\n12 4\n60 4\n24 4\n48 4\n0 4\n36 4\n30 4\n6 4\n54 4\n42 4\n18 4\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "12\n66 4\n12 4\n60 4\n24 4\n48 4\n0 4\n36 4\n30 4\n6 4\n54 4\n42 4\n18 4\n", "output": "6"}, {"type": "stdin_stdout", "input": "12\n66 4\n12 4\n60 4\n24 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\nNot to be confused with chessboa...
[{"type": "stdin_stdout", "input": "42\nquxukow soft\nwcn soft\npbwg soft\nlrp hard\nphdvfz soft\nidkvymji soft\nobq soft\nyhx soft\nijygw soft\nztzz soft\nuwdhnwu soft\ndgnuuej hard\nhntyyzr soft\nqxf hard\nztg soft\nhnpq soft\nuhznu soft\nitelgl hard\nggceadhw hard\nrxq soft\nkznmshem hard\nlri hard\ndalh soft\ngyzzu...
code_stdio
[ { "content": "You are an expert Python programmer. 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\nIf we multiply the integer ...
[{"input": "1611\n3", "output": "[1989]", "fn_name": "next_higher"}, {"input": "100\n3", "output": "[162]", "fn_name": "next_higher"}, {"input": "200\n4", "output": "[260]", "fn_name": "next_higher"}, {"input": "300\n5", "output": "[846]", "fn_name": "next_higher"}, {"input": "500\n7", "output": "[717]", "fn_name": "ne...
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\nWarawreh created a great company...
[{"type": "stdin_stdout", "input": "8 8 8\nRRRRGGGG\nRRRRGGGG\nRRRRGGGG\nRRRRGGGG\nYYYYBBBB\nYYYYBBBB\nYYYYBBBB\nYYYYBBBB\n1 1 8 8\n5 2 5 7\n3 1 8 6\n2 3 5 8\n1 2 6 8\n2 1 5 5\n2 1 7 7\n6 5 7 5\n", "output": "64\n0\n16\n4\n16\n4\n36\n0\n"}, {"type": "stdin_stdout", "input": "8 8 8\nRRRRGGGG\nRRRRGGGG\nRRRRGGGG\nRRRRGGG...
code_stdio
[ { "content": "You are an expert Python programmer. 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 us call two integers $x$ and...
[{"type": "stdin_stdout", "input": "1\n40\n1 1 5 6 2 10 12 10 4 2 17 18 6 3 1 4 1 1 7 2 9 10 3 2 4 1 9 1 1 4 2 7 8 1 7 9 2 17 7 2\n40\n1\n10\n1\n9\n0\n12\n9\n2\n1\n5\n13\n7\n3\n10\n4\n5\n0\n9\n0\n8\n5\n5\n3\n0\n6\n9\n1\n10\n13\n8\n3\n1\n2\n2\n7\n2\n2\n8\n4\n1\n", "output": "24\n24\n24\n24\n16\n24\n24\n24\n24\n24\n24\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\nIgor found out discounts in a sh...
[{"type": "stdin_stdout", "input": "50 45\n80 125 152 122 85 62 123 195 157 73 8 127 47 193 70 132 131 38 98 115 185 98 68 166 114 53 144 106 141 106 191 123 44 199 35 18 84 169 46 52 129 102 155 130 63 169 116 145 154 41\n155 187 79 106 136 173 17 146 9 47 173 21 37 183 110 74 185 14 82 156 147 25 162 195 26 25 22 80 ...
code_stdio
[ { "content": "You are an expert Python programmer. 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 arrays of leng...
[{"type": "stdin_stdout", "input": "3\n4\n3 3 10 10\n10 10 3 3\n5\n1 2 3 4 5\n6 7 8 9 10\n6\n72 101 108 108 111 44\n10 87 111 114 108 100\n", "output": "0\n8\n218\n"}, {"type": "stdin_stdout", "input": "1\n10\n12345 12345 12345 12345 12345 12345 12345 12345 12345 12345\n1 1 1 1 11 1 1 1 11 1\n", "output": "40\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\nWe have A cards, each of which h...
[{"type": "stdin_stdout", "input": "206383196 349216559 1444400245 1999999999\n", "output": "-1238017048\n"}, {"type": "stdin_stdout", "input": "206383196 349216559 1444400245 2000000000\n", "output": "-1238017049\n"}, {"type": "stdin_stdout", "input": "1000000000 199342280 739321284 1199342280\n", "output": "100000000...
code_stdio
[ { "content": "You are an expert Python programmer. 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$ seats in the train...
[{"type": "stdin_stdout", "input": "100 1000000000\n12 803 439 1031 435 300 497 520 718 573 782 523 328 88 275 159 128 389 920 869 503 80 490 289 22 889 353 799 29 131 1138 123 405 221 727 135 248 348 299 833 19 943 471 410 635 626 784 1205 213 724 550 437 860 536 718 173 406 832 520 748 512 29 466 982 574 848 11 693 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\nAlice got many presents these da...
[{"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "751201557\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000\n", "output": "751201557"}, {"type": "stdin_stdout", "input": "534571158 222043261\n", "output": "212941625\n"}, {"type": "stdin_stdout", "input": "922338645 900544285\n", "ou...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given several queries. E...
[{"type": "stdin_stdout", "input": "11\n1 1000000000000000000 10000000\n4 692 9\n1 2272 333111\n1 9 7\n25 31 1\n13 906830565560158478 22\n1971402979058461 750473176484995605 54\n14 19 23\n4 42409608949005314 23\n3 21914624432020321 46\n3 21914624432020321 47\n", "output": "Finite\nInfinite\nInfinite\nInfinite\nInfinite...
code_stdio
[ { "content": "You are an expert Python programmer. 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 know that the Martians use a...
[{"type": "stdin_stdout", "input": "11 1 199\n10 1 2 1 6 2 0 1 9 9 0 5 5 4 0 1 8 7 7 5 2 5 6 10 7 1 6 8 0 8 10 9 1 8 1 6 1 3 6 1 9 0 5 3 6 8 7 5 10 1 1 10 1 6 10 8 10 10 9 1 3 10 2 3 8 10 6 1 7 7 10 5 2 2 7 2 0 2 1 8 6 5 9 6 7 10 2 9 1 4 2 4 5 4 1 5 6 1 1 1 5 2 6 8 8 3 8 6 5 4 2 1 6 5 0 6 5 4 3 7 4 7 6 8 6 6 6 4 10 4 6...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGoa'uld Apophis captured Jack O'...
[{"type": "stdin_stdout", "input": "8 10\n1 2 3\n2 8 3\n1 4 1\n4 3 6\n3 7 7\n4 5 5\n5 7 2\n7 8 1\n1 6 8\n6 8 7\n0\n4 1 2 3 4\n0\n0\n0\n0\n0\n0\n", "output": " 8"}, {"type": "stdin_stdout", "input": "7 6\n1 2 1\n1 3 2\n2 4 3\n2 5 4\n3 5 6\n3 6 7\n0\n3 1 2 3\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 integers N and M.\...
[{"type": "stdin_stdout", "input": "000001 1010001101", "output": "1010001101\n"}, {"type": "stdin_stdout", "input": "000001 1010011101", "output": "1010011101\n"}, {"type": "stdin_stdout", "input": "000001 1110110010", "output": "1110110010\n"}, {"type": "stdin_stdout", "input": "000001 1110111010", "output": "1110111...
code_stdio
[ { "content": "You are an expert Python programmer. 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 define $S(x)$ to be the su...
[{"type": "stdin_stdout", "input": "5\n1\n10\n16\n178\n276008776\n", "output": "0\n1\n1\n17\n27600877\n"}, {"type": "stdin_stdout", "input": "5\n0\n16\n16\n178\n164382836\n", "output": "0\n1\n1\n17\n16438283\n"}, {"type": "stdin_stdout", "input": "5\n0\n27\n3\n128\n880055535\n", "output": "0\n2\n0\n12\n88005553\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\nGiven an array of numbers, retur...
[{"input": "[21, 34, 54, 43, 26, 12]", "output": "[42]", "fn_name": "between_extremes"}, {"input": "[-1, -41, -77, -100]", "output": "[99]", "fn_name": "between_extremes"}, {"input": "[-1, -1]", "output": "[0]", "fn_name": "between_extremes"}, {"input": "[1, -1]", "output": "[2]", "fn_name": "between_extremes"}, {"inpu...
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\nThe alphabetized kata\n---------...
[{"input": "\" a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\"", "output": "[\"aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ\"]", "fn_name": "alphabetized"}, {"input": "\"CodeWars can't Load Today\"", "output": "[\"aaaaCcdddeLnooorstTWy\"]", "fn_name": "a...
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\nSomeone give a strange birthday ...
[{"type": "stdin_stdout", "input": "33 2\n3 13\n17 3\n2 6\n5 33\n4 18\n1 2\n31 5\n4 19\n3 16\n1 3\n9 2\n10 3\n5 1\n5 28\n21 4\n7 2\n1 4\n5 24\n30 5\n14 3\n3 11\n27 5\n8 2\n22 4\n12 3\n20 4\n26 5\n4 23\n32 5\n25 5\n15 3\n29 5\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "33 2\n3 13\n17 3\n2 6\n5 33\n4 18\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\nButCoder Inc. runs a programming...
[{"type": "stdin_stdout", "input": "1110010000100001010 -1 -2", "output": "2220020000200002023\n"}, {"type": "stdin_stdout", "input": "1110010000100001010 -1 -3", "output": "1110010000100001013\n"}, {"type": "stdin_stdout", "input": "1100000010001000010 -1 -10", "output": "244444446666888893\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\nA tree is a connected graph with...
[{"type": "stdin_stdout", "input": "5\n7\n1 2\n1 3\n1 7\n1 5\n2 6\n4 7\n6\n1 2\n1 3\n2 4\n2 5\n3 6\n2\n1 2\n7\n6 3\n1 5\n1 3\n4 6\n4 7\n2 1\n5\n2 1\n2 3\n4 5\n3 4\n3 11\n", "output": "2\n2\n1\n2\n1\n"}, {"type": "stdin_stdout", "input": "5\n7\n1 2\n1 3\n1 4\n2 5\n2 6\n4 7\n6\n1 2\n1 3\n2 4\n2 5\n3 6\n2\n1 2\n7\n6 3\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\nYou have been assigned to develo...
[{"type": "stdin_stdout", "input": "5\n2\n))\n12\ngl))hf))))))\n9\ngege)))))\n14\n)aa))b))))))))\n1\n)\n", "output": "Yes\nNo\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "2\n6\naaaaa)\n6\n))))))\n", "output": "No\nYes\n"}, {"type": "stdin_stdout", "input": "1\n10\nsa)ttttttt\n", "output": "No\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\nImplement a function, so it will...
[{"input": "[\"The\", \"Earth\", \"rotates\", \"around\", \"The\", \"Sun\", \"in\", \"365\", \"days\", \",\", \"I\", \"know\", \"that\", \".\", \".\", \".\", \".\", \".\", \".\", \".\", \".\", \".\", \".\", \".\", \".\"]", "output": "[\"The Earth rotates around The Sun in 365 days, I know that.\"]", "fn_name": "make_se...
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 n integers a_1, a_...
[{"type": "stdin_stdout", "input": "100\n3 6 12 1 16 4 9 5 4 4 5 8 12 4 6 14 5 1 2 2 2 1 7 1 9 10 1 13 7 8 3 11 8 11 7 5 15 6 14 10 4 2 10 9 1 8 14 10 5 11 3 4 1 12 6 14 13 4 8 5 4 13 13 1 3 9 14 7 14 10 7 3 12 8 9 8 6 15 9 10 12 14 15 4 16 8 8 4 8 7 5 10 16 4 10 13 6 16 16 5\n", "output": "536\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\nSnuke has decided to play with a...
[{"type": "stdin_stdout", "input": "86483718001", "output": "15724312364\n"}, {"type": "stdin_stdout", "input": "79402108049", "output": "14436746918\n"}, {"type": "stdin_stdout", "input": "59146214190", "output": "10753857126\n"}, {"type": "stdin_stdout", "input": "149696127901", "output": "27217477801"}, {"type": "st...
code_stdio
[ { "content": "You are an expert Python programmer. 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 pair of positive integers $(a,...
[{"type": "stdin_stdout", "input": "9\n3 6\n1 101\n11 6\n50 3\n12 4\n69 420\n12345 6789\n123456 789\n29238676 9\n", "output": "1\n0\n7\n3\n5\n141\n53384\n160909\n36\n"}, {"type": "stdin_stdout", "input": "9\n3 4\n1 100\n4 6\n20 3\n19 4\n69 420\n12345 10703\n123456 789\n16177647 9\n", "output": "1\n0\n2\n3\n6\n141\n5729...
code_stdio
[ { "content": "You are an expert Python programmer. 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\nHeidi the Cow is aghast: cracks ...
[{"type": "stdin_stdout", "input": "350000 140000\n", "output": "453366\n"}, {"type": "stdin_stdout", "input": "350000 160000\n", "output": "155549\n"}, {"type": "stdin_stdout", "input": "350000 180000\n", "output": "708073\n"}, {"type": "stdin_stdout", "input": "350000 200000\n", "output": "504934\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\nThis kata is part of the collect...
[{"input": "\"72102450111111090\"", "output": "[11]", "fn_name": "largest_sum"}, {"input": "\"4755843230\"", "output": "[41]", "fn_name": "largest_sum"}, {"input": "\"3388049750\"", "output": "[25]", "fn_name": "largest_sum"}, {"input": "\"3902864190\"", "output": "[30]", "fn_name": "largest_sum"}, {"input": "\"4098611...
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\nTwo players play a game. The gam...
[{"type": "stdin_stdout", "input": "100 100 1 1 100 100\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "100 100 10 10 13 14\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "110 100 1 1 100 100\n", "output": "Second\n"}, {"type": "stdin_stdout", "input": "99 100 24 1 24 100\n", "output": "Seco...
code_stdio
[ { "content": "You are an expert Python programmer. 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\nGeneralized leap year\n\nNormall...
[{"type": "stdin_stdout", "input": "3 295 2014\n695\n100\n4\n1 1000 1999\n1\n2 1111 4526\n1\n2\n6 2000 3409\n5\n11\n21\n9\n3\n13\n0 0 0", "output": "414\n1000\n3416\n1159\n"}, {"type": "stdin_stdout", "input": "3 295 2014\n695\n100\n4\n1 1000 1999\n1\n2 1111 4526\n1\n2\n6 2000 3409\n9\n11\n21\n9\n3\n13\n0 0 0", "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 Hitachi string is a concatenat...
[{"type": "stdin_stdout", "input": "hhhi", "output": "No\n"}, {"type": "stdin_stdout", "input": "hhhj", "output": "No\n"}, {"type": "stdin_stdout", "input": "jhhh", "output": "No\n"}, {"type": "stdin_stdout", "input": "hjhh", "output": "No\n"}, {"type": "stdin_stdout", "input": "gjhh", "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\nMister B once received a gift: i...
[{"type": "stdin_stdout", "input": "1000 500 500 1000 499\n", "output": "501\n"}, {"type": "stdin_stdout", "input": "1000 500 500 1000 499\n", "output": "501\n"}, {"type": "stdin_stdout", "input": "1000 999 1000 1000 998\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1000 999 1000 1000 998\n", "output": "2\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\nBinary with 0 and 1 is good, but...
[{"input": "\"Chuck Norris' keyboard has 2 keys: 0 and white space.\"", "output": "[\"0 0 00 0000 0 0000 00 0 0 0 00 000 0 000 00 0 0 0 00 0 0 000 00 000 0 0000 00 0 0 0 00 0 0 00 00 0 0 0 00 00000 0 0 00 00 0 000 00 0 0 00 00 0 0 0000000 00 00 0 0 00 0 0 000 00 00 0 0 00 0 0 00 00 0 0 0 00 00 0 0000 00 00 0 00 00 0 0 ...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a country with n citize...
[{"type": "stdin_stdout", "input": "10\n7 9 4 4 7 6 3 7 9 8\n10\n1 3 2\n1 10 5\n1 5 3\n1 5 2\n1 2 9\n1 2 9\n1 2 10\n1 5 7\n1 6 10\n1 10 9\n", "output": "7 10 2 4 7 10 3 7 9 9\n"}, {"type": "stdin_stdout", "input": "10\n7 9 4 4 7 6 3 7 9 8\n10\n1 3 2\n1 10 5\n1 5 3\n1 5 2\n1 2 9\n1 2 7\n1 2 10\n1 5 7\n1 6 10\n1 10 9\n",...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA car moves from point A to poin...
[{"type": "stdin_stdout", "input": "1001 999 1000 1000 1000\n", "output": "1.00100000\n"}, {"type": "stdin_stdout", "input": "29 12 569 939 259\n", "output": "0.0509666080844\n"}, {"type": "stdin_stdout", "input": "714 474 124 205 491\n", "output": "5.75806451613\n"}, {"type": "stdin_stdout", "input": "772 467 142 356 ...
code_stdio
[ { "content": "You are an expert Python programmer. 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 Alex decided to remember...
[{"type": "stdin_stdout", "input": "21 10\n62637783*1\n23*51**531\n35*7*6.**.\n.*3***581*\n2.32*745**\n83*7*6*6*5\n*74.**6**3\n323*6**7*6\n3454*67.*1\n**63265*6*\n3725*4553*\n24****5**4\n23.34****4\n55257*1*4*\n4*3253*456\n**.3*45488\n*7318**4*5\n234.*4557*\n12..21*.*3\n286.235*4*\n834*11*.3*\n", "output": "NO\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\nA k-multiple free set is a set o...
[{"type": "stdin_stdout", "input": "100 2\n191 17 61 40 77 95 128 88 26 69 79 10 131 106 142 152 68 39 182 53 83 81 6 89 65 148 33 22 5 47 107 121 52 163 150 158 189 118 75 180 177 176 112 167 140 184 29 166 25 46 169 145 187 123 196 18 115 126 155 100 63 58 159 19 173 113 133 60 130 161 76 157 93 199 50 97 15 67 109 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\nC: Namo .. Cut\n\nproblem\n\n-De...
[{"type": "stdin_stdout", "input": "3\n2 2\n1 3\n2 1\n2\n2 3", "output": "1\n1\n"}, {"type": "stdin_stdout", "input": "3\n1 2\n1 3\n2 3\n2\n2 3", "output": "2\n2\n"}, {"type": "stdin_stdout", "input": "3\n1 1\n1 3\n2 3\n2\n2 3", "output": "1\n1\n"}, {"type": "stdin_stdout", "input": "3\n2 1\n1 3\n2 3\n2\n2 3", "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\n<image>\n\nInput\n\nThe input co...
[{"type": "stdin_stdout", "input": "15000\n", "output": "1349910001\n"}, {"type": "stdin_stdout", "input": "16344\n", "output": "1602659953\n"}, {"type": "stdin_stdout", "input": "13170\n", "output": "1040614381\n"}, {"type": "stdin_stdout", "input": "15302\n", "output": "1404815413\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\nYou are given an array $a$ of le...
[{"type": "stdin_stdout", "input": "1\n20 1\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "20000000000 20000000000\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\nBy 2312 there were n Large Hadro...
[{"type": "stdin_stdout", "input": "1 100\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- ...
code_stdio
[ { "content": "You are an expert Python programmer. 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\nThroughout Igor K.'s life he has...
[{"type": "stdin_stdout", "input": "446237720 920085248 296916273 439113596\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "491259590 529594367 305425951 326414536\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "960442940 572344654 77422042 406189391\n", "output": "1\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\nBob is preparing to pass IQ test...
[{"type": "stdin_stdout", "input": "100\n44 40 6 40 56 90 98 8 36 64 76 86 98 76 36 92 6 30 98 70 24 98 96 60 24 82 88 68 86 96 34 42 58 10 40 26 56 10 88 58 70 32 24 28 14 82 52 12 62 36 70 60 52 34 74 30 78 76 10 16 42 94 66 90 70 38 52 12 58 22 98 96 14 68 24 70 4 30 84 98 8 50 14 52 66 34 100 10 28 100 56 48 38 12 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou had $n$ positive integers $a...
[{"type": "stdin_stdout", "input": "1\nNEEEEEEEEEEEEEEEEEEEEEEEEEEEEENNNNEENNE\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1\nNEEEEEEEEEEEEEEEEEEEEEEEEEEEEENNNNEENNE\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "1\nNEEEEEEEFEEEEEEEEEEEEEEEEEEEEENNNNEENNE\n", "output": "YES\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\nAn element in an array is domina...
[{"input": "[67, 54, 27, 85, 66, 88, 31, 24, 49]", "output": "[[88, 49]]", "fn_name": "solve"}, {"input": "[104, 18, 37, 9, 36, 47, 28]", "output": "[[104, 47, 28]]", "fn_name": "solve"}, {"input": "[16, 17, 14, 3, 14, 5, 2]", "output": "[[17, 14, 5, 2]]", "fn_name": "solve"}, {"input": "[92, 52, 93, 31, 89, 87, 77, 10...
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 still have partial informati...
[{"type": "stdin_stdout", "input": "11\n1 100000000\n200000000 100000000\n200000000 300000000\n400000000 300000000\n400000000 500000000\n600000000 639960479\n618182416 700000000\n800000000 700000000\n800000000 900000000\n1000000000 900000000\n1000000000 1000000000\n", "output": "100000011\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\nAs a part of this Kata, you need...
[{"input": "[-0.41, -23, 4]", "output": "[0]", "fn_name": "gimme"}, {"input": "[-15, -10, 14]", "output": "[1]", "fn_name": "gimme"}, {"input": "[15, 10, 14]", "output": "[2]", "fn_name": "gimme"}, {"input": "[5, 10, 14]", "output": "[1]", "fn_name": "gimme"}, {"input": "[2, 3, 1]", "output": "[0]", "fn_name": "gimme"}...
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\nHow many multiples of d are ther...
[{"type": "stdin_stdout", "input": "-1 110 1", "output": "112\n"}, {"type": "stdin_stdout", "input": "-1 111 1", "output": "113\n"}, {"type": "stdin_stdout", "input": "-1 101 1", "output": "103\n"}, {"type": "stdin_stdout", "input": "12 139 1", "output": "128\n"}, {"type": "stdin_stdout", "input": "12 152 1", "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 an array $a$, cons...
[{"type": "stdin_stdout", "input": "100 3\n14717 1461 5753 7023 6804 1826 8793 9148 9920 240 8768 15059 11439 2732 794 959 9744 2253 3273 4685 4730 6873 11982 2875 1303 2535 4901 147 8587 339 4792 154 3104 6020 10358 5537 2686 6208 9494 1826 8083 1269 1841 6210 538 3105 4092 5163 9696 9013 2153 3985 2787 4471 1170 4991...
code_stdio
[ { "content": "You are an expert Python programmer. 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\nAndrii is good in Math, but not ...
[{"type": "stdin_stdout", "input": "17 5\n5\n4\n9\n32\n1", "output": "0\n0\n0\n14\n0\n"}, {"type": "stdin_stdout", "input": "10 5\n19\n-1\n2\n0\n0", "output": "8\n0\n0\n0\n0\n"}, {"type": "stdin_stdout", "input": "12 5\n5\n4\n14\n18\n1", "output": "0\n0\n1\n5\n0\n"}, {"type": "stdin_stdout", "input": "21 5\n5\n4\n9\n32...
code_stdio
[ { "content": "You are an expert Python programmer. 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### Count the number of Duplicat...
[{"input": "\"Indivisibilities\"", "output": "[2]", "fn_name": "duplicate_count"}, {"input": "\"abcdeaa\"", "output": "[1]", "fn_name": "duplicate_count"}, {"input": "\"abcdeaB\"", "output": "[2]", "fn_name": "duplicate_count"}, {"input": "\"abcde\"", "output": "[0]", "fn_name": "duplicate_count"}, {"input": "\"\"", "o...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA bracket sequence is a string t...
[{"type": "stdin_stdout", "input": "4\n((()))\n((((((\n))))))\n()()()\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "4\n((()))\n((((((\n))))))\n)()()(", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "4\n)))(((\n((((((\n))))))\n)()()(", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "4\n((())(...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nD: Sontaku (Surmise)\n\nSome twi...
[{"type": "stdin_stdout", "input": "5\n5 12 0 2 18", "output": "4\n"}, {"type": "stdin_stdout", "input": "5\n2 12 0 2 18", "output": "5\n"}, {"type": "stdin_stdout", "input": "5\n5 12 1 2 12", "output": "3\n"}, {"type": "stdin_stdout", "input": "5\n5 12 1 2 18", "output": "3\n"}, {"type": "stdin_stdout", "input": "5\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 will get an array of numbers...
[{"input": "[-4, 4]", "output": "[[-3, -2, -1, 0, 1, 2, 3]]", "fn_name": "find_missing_numbers"}, {"input": "[-3, -2, 1, 4]", "output": "[[-1, 0, 2, 3]]", "fn_name": "find_missing_numbers"}, {"input": "[-1, 0, 1, 2, 3, 4]", "output": "[[]]", "fn_name": "find_missing_numbers"}, {"input": "[0]", "output": "[[]]", "fn_nam...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Definition\n\nA **number** is ...
[{"input": "625", "output": "[\"Automorphic\"]", "fn_name": "automorphic"}, {"input": "25", "output": "[\"Automorphic\"]", "fn_name": "automorphic"}, {"input": "76", "output": "[\"Automorphic\"]", "fn_name": "automorphic"}, {"input": "1", "output": "[\"Automorphic\"]", "fn_name": "automorphic"}, {"input": "6", "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\nThe pizza store wants to know ho...
[{"input": "13\n0\n0", "output": "[39.5]", "fn_name": "order"}, {"input": "3\n1\n2", "output": "[14.5]", "fn_name": "order"}, {"input": "2\n0\n0", "output": "[13]", "fn_name": "order"}, {"input": "0\n3\n2", "output": "[19]", "fn_name": "order"}, {"input": "6\n2\n4", "output": "[26]", "fn_name": "order"}, {"input": "6\n...
code_functional