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 given several queries. E... | [{"type": "stdin_stdout", "input": "11\n1 1000000000000000000 10000000\n2 999 9\n2 999 333111\n0 15 14\n17 128 2\n13 311992186885373952 18\n1971402979058461 97576870171850009 100\n14 19 23\n3 21914624432020321 23\n0 21914624432020321 46\n3 21914624432020321 47\n", "output": "Finite\nInfinite\nFinite\nFinite\nFinite\nFi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 studies positional numeral... | [{"type": "stdin_stdout", "input": "1000 1000\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "1000 539\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "999 1000\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "1000 999\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "998 1000\n", "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\nWe have a grid with H rows and W... | [{"type": "stdin_stdout", "input": "6 7 12", "output": "RRRRRRR\nRRRRRRR\nRRRRRRR\nRRRRRRR\nRRRRRRR\nYRRRRRR\n"}, {"type": "stdin_stdout", "input": "7 6 1", "output": "RBRBRB\nBRBRBR\nRBRBRB\nBRBRBR\nRBRBRB\nBRBRBR\nRBRBRB\n"}, {"type": "stdin_stdout", "input": "6 6 12", "output": "RRRRRR\nRRRRRR\nRRRRRR\nRRRRRR\nRRRRR... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 strings ```a``` and b are ca... | [{"input": "\"RAMBUNCTIOUSLY\"\n\"THERMODYNAMICS\"", "output": "[true]", "fn_name": "isomorph"}, {"input": "\"DISCRIMINATIVE\"\n\"SIMPLIFICATION\"", "output": "[true]", "fn_name": "isomorph"}, {"input": "\"abcdefghijk\"\n\"abcdefghijba\"", "output": "[false]", "fn_name": "isomorph"}, {"input": "\"ABCBACCBA\"\n\"ABCBACC... | 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\nYour task it to return ```true``... | [{"input": "3691401\n1892272\n5", "output": "[false]", "fn_name": "isMultiple"}, {"input": "666\n665\n2", "output": "[false]", "fn_name": "isMultiple"}, {"input": "5\n2\n3", "output": "[false]", "fn_name": "isMultiple"}, {"input": "5\n3\n4", "output": "[false]", "fn_name": "isMultiple"}, {"input": "5\n4\n3", "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\nThere are n seats in the train's... | [{"type": "stdin_stdout", "input": "100 1000000000\n12 803 439 918 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 587 123 405 221 727 135 248 348 299 833 19 943 471 410 635 626 784 712 213 724 550 661 860 536 718 173 406 832 520 748 512 29 466 982 574 848 11 693 915 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMishka is trying really hard to ... | [{"type": "stdin_stdout", "input": "200\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "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 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFox Ciel is participating in a p... | [{"type": "stdin_stdout", "input": "178\n5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 12 6 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\nDuring their New Year holidays, ... | [{"type": "stdin_stdout", "input": "4\n4\n5 0 6 3\n3\n1 2 1\n4\n2 4 2 2\n2\n14 2\n", "output": "Alice\nAlice\nAlice\nAlice\n"}, {"type": "stdin_stdout", "input": "4\n4\n5 0 6 3\n3\n1 2 1\n4\n2 4 2 2\n2\n14 3\n", "output": "Alice\nAlice\nAlice\nAlice\n"}, {"type": "stdin_stdout", "input": "4\n4\n5 2 10 3\n3\n6 2 0\n4\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\nRingo Kingdom Congress is voting... | [{"type": "stdin_stdout", "input": "1 60\n11 10\n5 8\n3 4\n13 -1\n4 7", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 60\n11 10\n5 8\n4 4\n13 -1\n4 7", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 60\n11 10\n5 8\n4 4\n13 -1\n7 7", "output": "1\n"}, {"type": "stdin_stdout", "input": "1 60\n11 10\n5 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\nA factory produces thimbles in b... | [{"type": "stdin_stdout", "input": "5 2 2 1 8\n1 1 2\n1 5 3\n1 2 1\n2 2\n1 4 0\n1 3 2\n2 1\n2 3\n", "output": "3\n4\n4\n"}, {"type": "stdin_stdout", "input": "5 2 2 1 8\n1 1 1\n1 5 3\n1 2 1\n2 2\n1 4 2\n1 3 2\n2 1\n2 3\n", "output": "3\n6\n4\n"}, {"type": "stdin_stdout", "input": "5 2 2 1 8\n1 1 2\n1 5 3\n1 2 1\n2 2\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\nThree friends are going to meet ... | [{"type": "stdin_stdout", "input": "8\n4 6 16\n7 6 35\n12 5 1\n2 15 3\n1 1000000000 0000000000\n1 1000000000 459694946\n2 0 9\n4 2 6\n", "output": "20\n54\n18\n22\n1999999996\n1999999994\n14\n4\n"}, {"type": "stdin_stdout", "input": "8\n4 6 16\n7 6 35\n12 5 1\n2 15 3\n1 1000000000 0000000000\n1 1000000000 459694946\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "4\n5 2 2\n1 2 1 2 2\n9 3 3\n3 3 3 2 2 4 1 1 1\n4 18 4\n10 8 6 4\n16 10 8\n3 1 7 1 5 4 2 6 7 6 5 8 9 8 11 3\n", "output": "1\n1\n4\n6\n"}, {"type": "stdin_stdout", "input": "4\n5 2 4\n1 2 1 2 1\n9 3 3\n3 3 3 2 2 4 1 1 1\n4 18 4\n10 8 6 4\n16 10 8\n3 1 4 2 5 4 2 6 5 6 5 10 9 8 9 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\n# Scenario \n\n*Now that the com... | [{"input": "[-17, -45, -15, -33, -85, -56, -86, -30]", "output": "[[-86, -56, -30, -15, -17, -33, -45, -85]]", "fn_name": "men_from_boys"}, {"input": "[49, 818, -282, 900, 928, 281, -282, -1]", "output": "[[-282, 818, 900, 928, 281, 49, -1]]", "fn_name": "men_from_boys"}, {"input": "[-53, -26, -53, -27, -49, -51, -14]"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya used to be an accountant b... | [{"type": "stdin_stdout", "input": "56\npair pair pair int int pair pair pair pair pair int pair int int pair pair int pair pair pair int pair int int pair int pair int pair pair pair pair int pair pair int int pair int int pair int int int int int pair pair pair pair pair pair pair pair pair int pair pair int pair pai... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAmicable numbers are two differe... | [{"input": "220221\n282224", "output": "[false]", "fn_name": "amicable_numbers"}, {"input": "122265\n139815", "output": "[true]", "fn_name": "amicable_numbers"}, {"input": "299920\n9284", "output": "[false]", "fn_name": "amicable_numbers"}, {"input": "999220\n2849", "output": "[false]", "fn_name": "amicable_numbers"}, ... | 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\nOne day Vasya decided to have a ... | [{"type": "stdin_stdout", "input": "89\nH\nVOCI\nVOCI\nH\nVOCI\nH\nH\nVOCI\nVOCI\nVOCI\nH\nH\nH\nVOCI\nVOCI\nVOCI\nH\nVOCI\nVOCI\nH\nVOCI\nVOCI\nVOCI\nH\nVOCI\nH\nVOCI\nH\nVOCI\nH\nVOCI\nVOCI\nH\nVOCI\nVOCI\nVOCI\nVOCI\nVOCI\nVOCI\nH\nVOCI\nVOCI\nVOCI\nVOCI\nH\nVOCI\nH\nH\nVOCI\nH\nVOCI\nH\nVOCI\nVOCI\nVOCI\nVOCI\nVOCI... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMonocarp wrote down two numbers ... | [{"type": "stdin_stdout", "input": "23\n1 3\n100 1\n2 3\n200 1\n3 3\n300 1\n4 3\n400 1\n5 3\n500 1\n6 3\n600 1\n1 7\n1000000 4\n10 9\n1000000 4\n100 14\n1000010 4\n1000 7\n1000000 4\n10000 6\n1000000 4\n100000 5\n1000000 4\n1000000 4\n1000000 4\n1000000 4\n100000 5\n1000000 4\n10000 6\n1000000 4\n1000 7\n1000000 4\n100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwilight Sparkle once got a crys... | [{"type": "stdin_stdout", "input": "101\n", "output": "**************************************************D**************************************************\n*************************************************DDD*************************************************\n************************************************DDDDD******... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTake an input string and return ... | [{"input": "\"The quick brown fox jumps over the lazy dog.\"", "output": "[\"1a1b1c1d3e1f1g2h1i1j1k1l1m1n4o1p1q2r1s2t2u1v1w1x1y1z\"]", "fn_name": "string_letter_count"}, {"input": "\"abccdefgdhijklmno_pqrsTuvwxYz\"", "output": "[\"1a1b2c2d1e1f1g1h1i1j1k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z\"]", "fn_name": "string_letter_count... | 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\nMobile Display Keystrokes\n\nDo ... | [{"input": "\"longwordwhichdontreallymakessense\"", "output": "[107]", "fn_name": "mobile_keyboard"}, {"input": "\"thisisasms\"", "output": "[37]", "fn_name": "mobile_keyboard"}, {"input": "\"codewars\"", "output": "[26]", "fn_name": "mobile_keyboard"}, {"input": "\"zruf\"", "output": "[16]", "fn_name": "mobile_keyboar... | 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 prime number n (11, 19, 23, et... | [{"type": "stdin_stdout", "input": "11\n173\n0", "output": "4\n4\n4\n4\n4\n84\n86\n86\n84\n86\n84\n86\n86\n84\n84\n86\n86\n84\n84\n84\n84\n86\n86\n86\n86\n84\n84\n84\n84\n84\n86\n86\n86\n84\n86\n84\n86\n84\n84\n84\n84\n84\n84\n86\n84\n84\n86\n84\n86\n86\n86\n84\n86\n84\n86\n84\n84\n86\n84\n84\n84\n84\n86\n86\n84\n86\n8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAt a geometry lesson Bob learnt ... | [{"type": "stdin_stdout", "input": "-100 -100 100 100 -100 100\n", "output": "RIGHT\n"}, {"type": "stdin_stdout", "input": "-100 -100 100 -100 0 73\n", "output": "NEITHER\n"}, {"type": "stdin_stdout", "input": "-45 -87 -34 -79 -60 -62\n", "output": "NEITHER\n"}, {"type": "stdin_stdout", "input": "-45 -87 -44 -79 -60 -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\nThis kata is about multiplying a... | [{"input": "2", "output": "[16]", "fn_name": "simple_multiplication"}, {"input": "8", "output": "[64]", "fn_name": "simple_multiplication"}, {"input": "4", "output": "[32]", "fn_name": "simple_multiplication"}, {"input": "5", "output": "[45]", "fn_name": "simple_multiplication"}, {"input": "1", "output": "[9]", "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\nTanya has $n$ candies numbered f... | [{"type": "stdin_stdout", "input": "105\n5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 5 5 5 6\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "105\n5 5 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDescription overhauled by V\n\n-... | [{"input": "101", "output": "[7041757898200960193617914702466542659236800]", "fn_name": "candies_to_buy"}, {"input": "100", "output": "[69720375229712477164533808935312303556800]", "fn_name": "candies_to_buy"}, {"input": "61", "output": "[591133442051411133755680800]", "fn_name": "candies_to_buy"}, {"input": "60", "out... | 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\nIlya lives in a beautiful city o... | [{"type": "stdin_stdout", "input": "41\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1\n", "output": "39\n"}, {"type": "stdin_stdout", "input": "41\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1\n", "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\nAn bydrocarbon is an organic com... | [{"type": "stdin_stdout", "input": "1\n30", "output": "1\n14348906\n"}, {"type": "stdin_stdout", "input": "1\n30", "output": "1\n14348906\n"}, {"type": "stdin_stdout", "input": "1\n25", "output": "1\n1062881\n"}, {"type": "stdin_stdout", "input": "1\n29", "output": "1\n9565937\n"}, {"type": "stdin_stdout", "input": "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\nSection numbers are strings of d... | [{"input": "\"1.2.3.4\"\n\"1.2.3.4\"", "output": "[0]", "fn_name": "compare"}, {"input": "\"1.2.3\"\n\"1.02.003\"", "output": "[0]", "fn_name": "compare"}, {"input": "\"3.0.0\"\n\"3.1.1\"", "output": "[-1]", "fn_name": "compare"}, {"input": "\"1.2.1\"\n\"1.2.0\"", "output": "[1]", "fn_name": "compare"}, {"input": "\"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\nYou are given an array $a$ consi... | [{"type": "stdin_stdout", "input": "12\n123654 1 2 3 4 5 6 7 16 9 10 11\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "12\n123654 1 2 3 4 5 6 7 8 9 10 11\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "12\n123654 1 2 6 4 5 6 7 16 9 10 11\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "12\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\nFor a non-negative integer K, we... | [{"type": "stdin_stdout", "input": "2\n3 2 7 8\n12 3 1 15", "output": "10\n23\n"}, {"type": "stdin_stdout", "input": "2\n0 2 7 8\n12 3 1 15", "output": "13\n23\n"}, {"type": "stdin_stdout", "input": "2\n0 2 10 8\n6 3 1 15", "output": "16\n17\n"}, {"type": "stdin_stdout", "input": "2\n15 2 4 4\n7 6 1 26", "output": "13\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe saw the little game Marmot ma... | [{"type": "stdin_stdout", "input": "3 1\n1 3\n2 3\n4 10\n", "output": "14\n12\n2032\n"}, {"type": "stdin_stdout", "input": "3 1\n1 3\n2 3\n4 6\n", "output": "14\n12\n112\n"}, {"type": "stdin_stdout", "input": "3 1\n2 6\n1 3\n4 4\n", "output": "124\n14\n16\n"}, {"type": "stdin_stdout", "input": "3 1\n1 3\n2 5\n1 6\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 and Petya wrote down all i... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "Vasya\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "Vasya\n"}, {"type": "stdin_stdout", "input": "1000000001\n", "output": "Vasya\n"}, {"type": "stdin_stdout", "input": "0000000001\n", "output": "Vasya\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\n## Task:\nYou have to create a f... | [{"input": "-27", "output": "[false]", "fn_name": "is_pronic"}, {"input": "-3", "output": "[false]", "fn_name": "is_pronic"}, {"input": "3", "output": "[false]", "fn_name": "is_pronic"}, {"input": "4", "output": "[false]", "fn_name": "is_pronic"}, {"input": "5", "output": "[false]", "fn_name": "is_pronic"}, {"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\nWhat are you doing at the end of... | [{"type": "stdin_stdout", "input": "10\n100000 873326525630182716\n100000 620513733919162415\n100000 482953375281256917\n100000 485328193417229962\n100000 353549227094721271\n100000 367447590857326107\n100000 627193846053528323\n100000 243833127760837417\n100000 287297493528203749\n100000 70867563577617188\n", "output"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA palindrome is a word, phrase, ... | [{"input": "\"ACCDDCCA\"\n3", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "773\n\"1551\"", "output": "[\"Not valid\"]", "fn_name": "palindrome"}, {"input": "6\n4", "output": "[[11, 22, 33, 44]]", "fn_name": "palindrome"}, {"input": "-4505\n15", "output": "[\"Not valid\"]", "fn_name": "palindrome"},... | 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< PREVIOUS KATA\nNEXT KATA >\n \... | [{"input": "5", "output": "[\" 11111 \\n 22222 \\n 33333 \\n 44444 \\n1234555554321\\n1234555554321\\n1234555554321\\n1234555554321\\n1234555554321\\n 44444 \\n 33333 \\n 22222 \\n 11111 \"]", "fn_name": "pattern"}, {"input": "3", "output": "[\" 111 \\n 222 \\n1233321... | 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 cows have just learned what ... | [{"type": "stdin_stdout", "input": "1583\n", "output": "672\n"}, {"type": "stdin_stdout", "input": "1987\n", "output": "660\n"}, {"type": "stdin_stdout", "input": "1993\n", "output": "656\n"}, {"type": "stdin_stdout", "input": "1997\n", "output": "996\n"}, {"type": "stdin_stdout", "input": "1999\n", "output": "648\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\nProblem Statement\n\nIn the head... | [{"type": "stdin_stdout", "input": "3 10 3\n000 0000000000\n110 0000001011\n101 1111111100\n2 6 0\n1 2 0\n2 1 1\n01 1\n11 11 10\n10000000000 10000000000\n11000000000 00000000000\n01100000000 00100000000\n00110000000 00010000000\n00011000000 00001000000\n00001100000 00000100000\n01000110000 00000010000\n00000011000 0000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 data that records the a... | [{"type": "stdin_stdout", "input": "3783.6109384455353\n1821.5992049377405\n649.3237125101873\n2008.8147615323267\n1214.1371939030753", "output": "3134.28722594\n"}, {"type": "stdin_stdout", "input": "3784.5476877206565\n1821.5992049377405\n649.3237125101873\n2008.8147615323267\n1214.1371939030753", "output": "3135.223... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 workers in a company... | [{"type": "stdin_stdout", "input": "10 6\n3 0 0 0 0 0 0 1 0 0\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "10 6\n3 1 0 0 0 0 0 1 0 0\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "10 6\n3 0 1 0 0 0 0 1 0 1\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10 6\n3 0 0 0 0 0 0 1 0 1\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Wolf town there are 2 big mar... | [{"type": "stdin_stdout", "input": "4\n15 15 50\n15 15 18\n43 88 200\n2013 2013 2013", "output": "20.000\n0.0\n69.00000\n0"}, {"type": "stdin_stdout", "input": "4\n15 15 50\n15 15 18\n43 88 200\n2013 2013 2013", "output": "20.0\n0\n69.0\n0\n"}, {"type": "stdin_stdout", "input": "4\n2 25 50\n15 12 28\n11 88 200\n2715 17... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 interactive problem.\... | [{"type": "stdin_stdout", "input": "10 3 632584719\n378382911 9\n978367651 -1\n176599346 7\n557138623 8\n441019502 4\n823417558 2\n244832688 10\n702148024 6\n385598339 5\n357778234 1\n", "output": "? 3\n? 9\n! 978367651\n"}, {"type": "stdin_stdout", "input": "10 3 632584719\n378382911 9\n978367651 -1\n176599346 7\n5571... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 string S consisting of... | [{"type": "stdin_stdout", "input": "99\nlbyhybgfptdyuqnlszvxoggbjhrjopbevyrzytfhiabtoozntnxxcvmhckjlwxnzniwzzxzvmfiztyirssfeauzncyosgrmsgull\n", "output": "lbyhybgfptdyuqnlszvxoggbjhrjopbevyrzytfhiabtoozntnxxcvmhckjlwxnzniwzzxzvmfiztyirssfeauzncyosgrmsgul...\n"}, {"type": "stdin_stdout", "input": "100\nvefcekrnrodmjprt... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nTo charge your mobile p... | [{"input": "1000\n5000", "output": "[0.26]", "fn_name": "calculate_time"}, {"input": "3050\n2600", "output": "[1.53]", "fn_name": "calculate_time"}, {"input": "2000\n1000", "output": "[2.6]", "fn_name": "calculate_time"}, {"input": "5000\n1000", "output": "[6.5]", "fn_name": "calculate_time"}, {"input": "1000\n500", "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\nKavi has 2n points lying on the ... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "126330412"}, {"type": "stdin_stdout", "input": "372544\n", "output": "214345447\n"}, {"type": "stdin_stdout", "input": "315936\n", "output": "256195953\n"}, {"type": "stdin_stdout", "input": "446167\n", "output": "461428149\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 of intege... | [{"type": "stdin_stdout", "input": "6\n300000000 200000000 300000000 200000000 1000000000 300000000\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "6\n300000000 200000000 300000000 200000000 1000000000 300000000\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "6\n506233607 200000000 300000000 200000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHave you ever tasted Martian foo... | [{"type": "stdin_stdout", "input": "2\n4 3 1\n5 2 2\n", "output": "0.9230769231\n0.6521739130\n"}, {"type": "stdin_stdout", "input": "2\n8 3 1\n4 2 2\n", "output": "2.4489795918\n0.6666666667\n"}, {"type": "stdin_stdout", "input": "2\n9 3 1\n4 2 2\n", "output": "2.5714285714\n0.6666666667\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\nYou are a given an array $a$ of ... | [{"type": "stdin_stdout", "input": "100 16\n14 94 97 89 73 165 11 78 10 30 54 57 88 57 44 6 33 40 17 26 69 100 92 67 22 59 80 67 17 29 76 69 133 7 86 45 1 98 99 25 65 102 94 91 7 24 53 40 53 91 59 32 67 24 25 157 55 46 68 53 2 15 92 5 53 37 76 40 49 94 4 8 76 12 50 2 54 86 49 95 81 5 34 28 21 47 97 73 96 56 32 78 71 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\nSnuke lives at position x on a n... | [{"type": "stdin_stdout", "input": "1 999 1000\n", "output": "A\n"}, {"type": "stdin_stdout", "input": "1 1455 0000", "output": "B\n"}, {"type": "stdin_stdout", "input": "1 1200 0101", "output": "B\n"}, {"type": "stdin_stdout", "input": "1 999 0000", "output": "B\n"}, {"type": "stdin_stdout", "input": "1 381 1110", "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\n### What is simplifying a square... | [{"input": "200", "output": "[\"10 sqrt 2\"]", "fn_name": "simplify"}, {"input": "18", "output": "[\"3 sqrt 2\"]", "fn_name": "simplify"}, {"input": "20", "output": "[\"2 sqrt 5\"]", "fn_name": "simplify"}, {"input": "24", "output": "[\"2 sqrt 6\"]", "fn_name": "simplify"}, {"input": "32", "output": "[\"4 sqrt 2\"]", "... | 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\nSimple transposition is a basic ... | [{"input": "\"Imagination is more important than knowledge\"", "output": "[\"Iaiaini oeipratta nwegmgnto smr motn hnkolde\"]", "fn_name": "simple_transposition"}, {"input": "\"The better part of valor is discretion\"", "output": "[\"Tebte ato ao sdsrtoh etrpr fvlri icein\"]", "fn_name": "simple_transposition"}, {"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\nExample\n\nInput\n\n2 2 2 1\n0 0... | [{"type": "stdin_stdout", "input": "26 2 22 0\n-1 2 0", "output": "1336\n"}, {"type": "stdin_stdout", "input": "36 2 22 0\n-1 2 0", "output": "1816\n"}, {"type": "stdin_stdout", "input": "36 2 43 0\n-1 2 0", "output": "3412\n"}, {"type": "stdin_stdout", "input": "3 8 88 0\n-2 8 -1", "output": "1984\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\nRecently Vova found $n$ candy wr... | [{"type": "stdin_stdout", "input": "53\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n3\n", "output": "1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string of length... | [{"type": "stdin_stdout", "input": "mjssissippi", "output": "57\n"}, {"type": "stdin_stdout", "input": "mjssisrippi", "output": "61\n"}, {"type": "stdin_stdout", "input": "mjssisripph", "output": "62\n"}, {"type": "stdin_stdout", "input": "hppirsitsjm", "output": "63\n"}, {"type": "stdin_stdout", "input": "mjsthspiroh"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 use a robot... | [{"type": "stdin_stdout", "input": "16 10\n1 12 12 27 52 132 731 18298 395504 534840 1276551 903860 9384806 19108104 82684732 535447408", "output": "3248775590\n"}, {"type": "stdin_stdout", "input": "16 10\n0 12 12 27 52 132 731 18298 395504 534840 1276551 903860 9384806 19108104 82684732 535447408", "output": "3248775... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 winner of the card game popu... | [{"type": "stdin_stdout", "input": "12\natrtthfpcvishmqbakprquvnejr 185\natrtthfpcvishmqbakprquvnejr -699\natrtthfpcvishmqbakprquvnejr -911\natrtthfpcvishmqbakprquvnejr -220\nfcgslzkicjrpbqaifgweyzreajjfdo 132\nfcgslzkicjrpbqaifgweyzreajjfdo -242\nm 177\nm -549\natrtthfpcvishmqbakprquvnejr -242\nm 38\natrtthfpcvishmqba... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem statement\n\n2D, who is ... | [{"type": "stdin_stdout", "input": "2\npaks 0\naxii -1\n-1\nnkua hx`j", "output": "-1\n"}, {"type": "stdin_stdout", "input": "2\ntako -1\njiay -1\n0\npuja yakh", "output": "-2\n"}, {"type": "stdin_stdout", "input": "2\npaks -2\nayhi -1\n0\nmauk j`xh", "output": "-3\n"}, {"type": "stdin_stdout", "input": "2\npaks 1\naxi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour friend gave you a dequeue D... | [{"type": "stdin_stdout", "input": "50 100\n-10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000000 -10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 permutation p of size n is an ... | [{"type": "stdin_stdout", "input": "1000 4\n", "output": "373086956251\n"}, {"type": "stdin_stdout", "input": "1000 4\n", "output": "373086956251\n"}, {"type": "stdin_stdout", "input": "800 4\n", "output": "152620985001\n"}, {"type": "stdin_stdout", "input": "800 4\n", "output": "152620985001\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\nproblem\n\nYou are a traveler tr... | [{"type": "stdin_stdout", "input": "7 5\n2\n0\n1\n1\n2\n-1\n2\n-1\n2\n2\n-3", "output": "10\n"}, {"type": "stdin_stdout", "input": "7 0\n1\n-1\n1\n3\n1\n-1\n3\n-2\n-1\n1\n0", "output": "0\n"}, {"type": "stdin_stdout", "input": "7 0\n1\n-1\n1\n2\n1\n-1\n3\n-2\n-1\n1\n0", "output": "0\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\nPetya loves lucky numbers very m... | [{"type": "stdin_stdout", "input": "100000 77777\n", "output": "177777\n"}, {"type": "stdin_stdout", "input": "150234 77777\n", "output": "177777\n"}, {"type": "stdin_stdout", "input": "77777 77777\n", "output": "177777\n"}, {"type": "stdin_stdout", "input": "47774 47774\n", "output": "147774\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\nKilani is playing a game with hi... | [{"type": "stdin_stdout", "input": "4 7 2\n13 1\n....###\n.#..1..\n.#.###.\n2#.....\n", "output": "18 1 \n"}, {"type": "stdin_stdout", "input": "4 7 2\n13 1\n###....\n..1..#.\n.###.#.\n.....#2\n", "output": "18 1 \n"}, {"type": "stdin_stdout", "input": "4 7 2\n13 1\n###....\n..1..#.\n.###.#.\n.....#2\n", "output": "18 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOur master carpenter is designin... | [{"type": "stdin_stdout", "input": "000 12 208", "output": "197\n"}, {"type": "stdin_stdout", "input": "000 9 208", "output": "200\n"}, {"type": "stdin_stdout", "input": "000 4 120", "output": "117\n"}, {"type": "stdin_stdout", "input": "000 16 106", "output": "91\n"}, {"type": "stdin_stdout", "input": "000 26 106", "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\nVladik often travels by trains. ... | [{"type": "stdin_stdout", "input": "100\n931 4584 2116 3004 3813 62 2819 2998 2080 4906 3198 2443 2952 3793 1958 3864 3985 3169 3134 4011 4525 995 4163 308 4362 1148 4906 3092 1647 244 1370 1424 2753 84 2997 1197 2606 425 3501 2606 683 4747 3884 4787 2166 3017 3080 4303 3352 1667 2636 3994 757 2388 870 1788 988 1303 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 Smart Beaver from ABBYY deci... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "1998535156\n"}, {"type": "stdin_stdout", "input": "999161856\n", "output": "1998319610\n"}, {"type": "stdin_stdout", "input": "999936000\n", "output": "1999743134\n"}, {"type": "stdin_stdout", "input": "999999948\n", "output": "1833697140\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\nOur world is one-dimensional, an... | [{"type": "stdin_stdout", "input": "99 99 -22 62\n-9 -54 -13 -39 -79 -88 -6 -14 -41 -29 -2 -69 -30 -20 -33 -8 -24 -80 -19 -87 -32 -60 -40 -59 -44 -52 -3 -67 -18 -51 -56 -12 -7 -31 -48 -27 -68 -78 -21 -11 -49 -93 -1 -64 -82 -66 -70 -58 -84 -26 -57 -37 -53 -89 -50 -34 -61 -46 -92 -95 -99 -63 -65 -28 -10 -16 -73 -55 -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\nLet's call an array $a$ consisti... | [{"type": "stdin_stdout", "input": "4\n1\n12\n13\n35\n", "output": "1\n4\n4\n6\n"}, {"type": "stdin_stdout", "input": "4\n1\n12\n11\n14\n", "output": "1\n4\n4\n4\n"}, {"type": "stdin_stdout", "input": "4\n1\n12\n22\n35\n", "output": "1\n4\n5\n6\n"}, {"type": "stdin_stdout", "input": "4\n2\n12\n11\n14\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\nPermutation $p$ is a sequence of... | [{"type": "stdin_stdout", "input": "4\n5\n1 3 4 5 5\n4\n1 1 3 4\n2\n2 2\n1\n1\n", "output": "1 3 4 5 2 \n-1\n2 1 \n1 \n"}, {"type": "stdin_stdout", "input": "4\n5\n1 3 4 5 5\n4\n1 1 3 4\n2\n2 2\n1\n1\n", "output": "1 3 4 5 2 \n-1\n2 1 \n1 \n"}, {"type": "stdin_stdout", "input": "4\n5\n2 3 4 5 5\n4\n1 1 3 4\n2\n2 2\n1\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe define the function `f1(n,k)`... | [{"input": "9567100\n8", "output": "[9567115]", "fn_name": "find_f1_eq_f2"}, {"input": "568525\n7", "output": "[568531]", "fn_name": "find_f1_eq_f2"}, {"input": "14990\n7", "output": "[14996]", "fn_name": "find_f1_eq_f2"}, {"input": "30500\n3", "output": "[30501]", "fn_name": "find_f1_eq_f2"}, {"input": "62550\n5", "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\nAlice guesses the strings that B... | [{"type": "stdin_stdout", "input": "11\nabbaac\nabbaac\nabbaac\nabbaac\nabbaac\nabbaac\nabbaac\nabbaac\nac\nbccddaaf\nzzzzzzzzzz\n", "output": "abac\nabac\nabac\nabac\nabac\nabac\nabac\nabac\nac\nbcdaf\nzzzzzz\n"}, {"type": "stdin_stdout", "input": "10\nabbaac\nac\nbccddaaf\nzzzzzzzzzz\nabbaac\nac\nbccddaaf\nzzzzzzzzzz... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMashmokh's boss, Bimokh, didn't ... | [{"type": "stdin_stdout", "input": "2000 2000\n", "output": "585712681"}, {"type": "stdin_stdout", "input": "1544 1794\n", "output": "933285446"}, {"type": "stdin_stdout", "input": "1639 1056\n", "output": "467464129"}, {"type": "stdin_stdout", "input": "2000 1000\n", "output": "228299266"}, {"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\nHave you ever had an infinite lo... | [{"type": "stdin_stdout", "input": "6\n10 SET d 1\n20 SET h 5\n100 ADD s s i\n110 SUB i i c\n120 IF i 100\n124 HALT", "output": "c=0\nd=1\nh=5\ni=0\ns=0\n"}, {"type": "stdin_stdout", "input": "6\n10 SET c 1\n20 SET h 5\n100 ADD s s i\n110 SUB i i c\n209 IF j 100\n200 HALT", "output": "c=1\nh=5\ni=0\nj=0\ns=0\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFinally, a basketball court has ... | [{"type": "stdin_stdout", "input": "100\n4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1\n1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 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 rectangular grid of n... | [{"type": "stdin_stdout", "input": "50 8\n.....#..\n........\n........\n.....#..\n.....#..\n........\n........\n........\n........\n...#....\n...#....\n........\n...#....\n#.#.#...\n...#....\n...#....\n........\n...#....\n...#....\n...#....\n........\n#.#.#...\n.....#..\n........\n#.#.#...\n#.#.#...\n#.#.#...\n...#....... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTakahashi is standing on a two-d... | [{"type": "stdin_stdout", "input": "1329", "output": "120\n"}, {"type": "stdin_stdout", "input": "1162", "output": "180\n"}, {"type": "stdin_stdout", "input": "1369", "output": "360\n"}, {"type": "stdin_stdout", "input": "1527", "output": "120\n"}, {"type": "stdin_stdout", "input": "1874", "output": "180\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\nNumber of tanka\n\nWishing to di... | [{"type": "stdin_stdout", "input": "1\n1\n3\n1531\n2317\n714\n225725068861419081\n0", "output": "10\n10\n13\n55955\n155155\n7277\n3223333233333322222322232232233222323233333233223332\n"}, {"type": "stdin_stdout", "input": "1\n1\n4\n1531\n2317\n714\n225725068861419081\n0", "output": "10\n10\n14\n55955\n155155\n7277\n322... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 of non-ne... | [{"input": "[1, 4, 6]", "output": "[[0, 1, 2, 3, 4, 5, 6]]", "fn_name": "complete_series"}, {"input": "[3, 4, 5]", "output": "[[0, 1, 2, 3, 4, 5]]", "fn_name": "complete_series"}, {"input": "[2, 1]", "output": "[[0, 1, 2]]", "fn_name": "complete_series"}, {"input": "[1, 4, 4, 6]", "output": "[[0]]", "fn_name": "complet... | 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\nPaladin Manao caught the trail o... | [{"type": "stdin_stdout", "input": "50 2 5\n9 14\n46 34\n40 35\n44 30\n32 16\n1 38\n48 2\n17 14\n50 25\n6 1\n45 19\n21 15\n22 11\n15 33\n8 28\n2 32\n10 22\n37 3\n43 39\n25 16\n9 19\n16 3\n28 32\n20 45\n24 32\n4 18\n49 39\n13 45\n26 4\n11 33\n14 37\n42 19\n31 45\n38 3\n34 8\n18 29\n35 34\n29 16\n7 46\n19 28\n27 33\n30 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\nPolycarp has found a table havin... | [{"type": "stdin_stdout", "input": "100\n1\n2\n2\n3\n4\n5\n6\n13\n15\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n35\n20\n21\n22\n23\n24\n25\n26\n27\n28\n23\n30\n31\n32\n33\n34\n35\n36\n19\n38\n60\n40\n41\n42\n43\n44\n119\n46\n47\n77\n49\n44\n51\n45\n53\n54\n55\n56\n57\n58\n87\n60\n61\n42\n63\n64\n65\n66\n67\n68\n69\n70\n12... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTo celebrate the start of the Ri... | [{"input": "\"eCEHWEPwwnvzMicyaRjk\"", "output": "[\"Bronze!\"]", "fn_name": "olympic_ring"}, {"input": "\"EWlZlDFsEIBufsalqof\"", "output": "[\"Silver!\"]", "fn_name": "olympic_ring"}, {"input": "\"JKniLfLW\"", "output": "[\"Not even a medal!\"]", "fn_name": "olympic_ring"}, {"input": "\"wHjMudLwtoPGocnJ\"", "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 Little Elephant loves chess ... | [{"type": "stdin_stdout", "input": "WBWBWBWB\nBWBWBWBW\nBWBWBWBW\nBWBWBWBW\nWBWBWBWB\nWBWBWBWB\nBWBWBWBW\nWBWBWBWB\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "BWBWBWBW\nWBWBWBWB\nBWBWBWBW\nBWBWBWBW\nWBWBWBWB\nWBWBWBWB\nWBWBWBWB\nWBWBWBWB\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "BWBWBWBW... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 semester is already ending, ... | [{"type": "stdin_stdout", "input": "8\n", "output": "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n+*+*+*+*+... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEvery Codeforces user has rating... | [{"type": "stdin_stdout", "input": "50\n67 1\n89 2\n83 1\n-26 1\n88 2\n-22 2\n-98 2\n-83 1\n58 2\n26 2\n-37 1\n-51 2\n29 1\n47 2\n-70 1\n81 2\n36 1\n52 2\n93 2\n-12 2\n-12 1\n5 2\n91 1\n3 1\n-27 1\n18 1\n-60 1\n-15 1\n17 1\n-33 1\n-74 2\n5 2\n-62 2\n72 1\n-22 1\n-58 1\n-9 1\n57 1\n-18 2\n-11 1\n-103 2\n74 2\n-20 2\n21 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nReca company makes monitors, the... | [{"type": "stdin_stdout", "input": "2000000000 2000000000 1999999998 1999999999\n", "output": "1999999998 1999999999"}, {"type": "stdin_stdout", "input": "2000000000 2000000000 1999999999 1999999998\n", "output": "1999999999 1999999998"}, {"type": "stdin_stdout", "input": "1688112099 1875662241 198852947 116042960\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\nRecall that the permutation is a... | [{"type": "stdin_stdout", "input": "250000 993244853\n", "output": "872048421\n"}, {"type": "stdin_stdout", "input": "244435 994838543\n", "output": "634651929\n"}, {"type": "stdin_stdout", "input": "234324 994631069\n", "output": "720229385\n"}, {"type": "stdin_stdout", "input": "249996 997202249\n", "output": "633673... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Cybermen solved that first t... | [{"type": "stdin_stdout", "input": "5 0\n2 1\n-2 -1\n-1 1\n-2 -2\n2 2\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "5 1\n1 1\n-1 -1\n-1 1\n-2 -2\n2 0\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "5 1\n2 1\n-1 -1\n-1 1\n-2 -2\n2 0\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "5 1\n2 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\nProgrammer Sasha has recently be... | [{"type": "stdin_stdout", "input": "10 3\n-20\n-63\n-64\n45\n-84\n-13\n79\n-31\n70\n-100\n", "output": "-20\n45\n45\n45\n79\n79\n79\n70\n"}, {"type": "stdin_stdout", "input": "10 3\n-20\n-52\n-64\n45\n-139\n-13\n79\n-31\n89\n-100\n", "output": "-20\n45\n45\n45\n79\n79\n89\n89"}, {"type": "stdin_stdout", "input": "10 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\nIf we alternate the vowels and c... | [{"input": "\"acidity\"", "output": "[\"caditiy\"]", "fn_name": "solve"}, {"input": "\"codewars\"", "output": "[\"failed\"]", "fn_name": "solve"}, {"input": "\"orudere\"", "output": "[\"ederoru\"]", "fn_name": "solve"}, {"input": "\"oruder\"", "output": "[\"edorur\"]", "fn_name": "solve"}, {"input": "\"zodiac\"", "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\nDivision of Big Integers\n\nGive... | [{"type": "stdin_stdout", "input": "12 -1", "output": "-12\n"}, {"type": "stdin_stdout", "input": "10 -1", "output": "-10\n"}, {"type": "stdin_stdout", "input": "20 -1", "output": "-20\n"}, {"type": "stdin_stdout", "input": "11 -1", "output": "-11\n"}, {"type": "stdin_stdout", "input": "15 -1", "output": "-15\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\nVasya has n items lying in a lin... | [{"type": "stdin_stdout", "input": "2 100 100 10000 10000\n100 100\n", "output": "20000\n"}, {"type": "stdin_stdout", "input": "2 110 100 10000 10000\n100 100\n", "output": "21000\n"}, {"type": "stdin_stdout", "input": "2 110 100 10000 11101\n100 000\n", "output": "11000\n"}, {"type": "stdin_stdout", "input": "2 110 10... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRng is going to a festival.\n\nT... | [{"type": "stdin_stdout", "input": "CODEFESTIVALFERTIVAL", "output": "CODEFESTIVAL\n"}, {"type": "stdin_stdout", "input": "CODEFESTIWALFESTIWAL", "output": "CODEFESTIWAL\n"}, {"type": "stdin_stdout", "input": "LAWITSEFLAWITSEFEDOC", "output": "LAWITSEFLAWI\n"}, {"type": "stdin_stdout", "input": "CODEFWSTIWALFESTIEAL", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nI want to put as many... | [{"type": "stdin_stdout", "input": "87 15\n12 66", "output": "1305\n"}, {"type": "stdin_stdout", "input": "87 29\n12 66", "output": "2523\n"}, {"type": "stdin_stdout", "input": "27 27\n16 16", "output": "473\n"}, {"type": "stdin_stdout", "input": "27 32\n16 16", "output": "352\n"}, {"type": "stdin_stdout", "input": "-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 three integers $a$... | [{"type": "stdin_stdout", "input": "47\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 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\nAs a strict big brother, I do li... | [{"input": "9\n10\n11", "output": "[false]", "fn_name": "can_i_play"}, {"input": "12\n12\n13", "output": "[true]", "fn_name": "can_i_play"}, {"input": "13\n10\n15", "output": "[true]", "fn_name": "can_i_play"}, {"input": "14\n9\n14", "output": "[false]", "fn_name": "can_i_play"}, {"input": "15\n8\n12", "output": "[fals... | 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\nAs you know, majority of student... | [{"type": "stdin_stdout", "input": "10 10\n7 29\n10 31\n9 40\n5 17\n5 30\n6 85\n2 53\n7 23\n4 57\n10 9\n", "output": "49\n"}, {"type": "stdin_stdout", "input": "10 10\n5 81\n7 68\n7 48\n1 10\n5 37\n7 97\n8 54\n7 41\n7 56\n5 21\n", "output": "110\n"}, {"type": "stdin_stdout", "input": "10 10\n7 29\n10 54\n9 40\n5 17\n5 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 rectangular boar... | [{"type": "stdin_stdout", "input": "14 16\n", "output": "112\n"}, {"type": "stdin_stdout", "input": "15 16\n", "output": "120\n"}, {"type": "stdin_stdout", "input": "16 16\n", "output": "128\n"}, {"type": "stdin_stdout", "input": "14 15\n", "output": "105\n"}, {"type": "stdin_stdout", "input": "15 15\n", "output": "112... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\n**_Given_** *a numb... | [{"input": "1000000", "output": "[1000000]", "fn_name": "max_number"}, {"input": "566797", "output": "[977665]", "fn_name": "max_number"}, {"input": "63792", "output": "[97632]", "fn_name": "max_number"}, {"input": "7389", "output": "[9873]", "fn_name": "max_number"}, {"input": "213", "output": "[321]", "fn_name": "max... | 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\nJack decides to invite Emma out ... | [{"type": "stdin_stdout", "input": "10 10\n256 72 455 45 912 506 235 68 951 92\n246 305 45 212 788 621 449 876 459 899\n732 107 230 357 370 610 997 669 61 192\n131 93 481 527 983 920 825 540 435 54\n777 682 984 20 337 480 264 137 249 502\n51 467 479 228 923 752 714 436 199 973\n3 91 612 571 631 212 751 84 886 948\n252 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 going to be given an arr... | [{"input": "[-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85, -84, -83, -82, -81, -80, -79, -78, -77, -76, -75, -74, -73, -72, -71, -70, -69, -68, -67, -66, -65, -64, -63, -62, -61, -60, -59, -58, -57, -56, -55, -54, -53, -52, -51, -50, -49, -48, -47, -46, -45, -44, -43, -42, -41, -40, -... | code_functional |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.