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\nTo stay woke and attentive durin... | [{"type": "stdin_stdout", "input": "3 2 4\n91 288\n92 97\n116 271\n92 192\n93 97\n95 138\n90 100\n", "output": "83\n5\n26\n6\n"}, {"type": "stdin_stdout", "input": "3 2 4\n91 510\n92 97\n66 271\n51 94\n93 97\n95 316\n100 111\n", "output": "4\n5\n177\n12\n"}, {"type": "stdin_stdout", "input": "3 2 4\n91 288\n92 97\n116 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 beautiful girls i... | [{"type": "stdin_stdout", "input": "64 118\n361 547 410 294 448 377 482 490 13 116 346 50 251 330 443 128 543 580 370 489 337 509 414 291 228 71 245 308 319 314 154 39 317 288 145 248 547 152 262 278 89 108 522 238 128 575 112 469 86 230 310 492 127 270 475 25 179 72 345 444 17 332 544 338\n", "output": "3\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\nValentin participates in a show ... | [{"type": "stdin_stdout", "input": "15\n. r\n? e\n. s\n. rw\n? y\n. fj\n. zftyd\n? r\n! wq\n? w\n? p\n. ours\n. dto\n. lbyfru\n? q\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "8\n! hello\n! codeforces\n? c\n. o\n? d\n? h\n. l\n? e\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "7\n! ababahalamaha\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 should have done Product Par... | [{"input": "96\n5", "output": "[[18, 2, [[2, 2, 2, 2, 6], [2, 2, 2, 3, 4]]]]", "fn_name": "prod_int_partII"}, {"input": "36\n3", "output": "[[8, 3, [[2, 2, 9], [2, 3, 6], [3, 3, 4]]]]", "fn_name": "prod_int_partII"}, {"input": "96\n6", "output": "[[18, 1, [2, 2, 2, 2, 2, 3]]]", "fn_name": "prod_int_partII"}, {"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\nProblem statement\n\nA programmi... | [{"type": "stdin_stdout", "input": "6\n1 2 0 15 0 2\n7\n2 5 4 2 6 1 0\n1 28 1 3 5 1 0", "output": "Yes\nNo\nYes\nYes\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "6\n1 1 0 15 0 3\n7\n2 5 4 2 10 1 0\n1 28 1 3 0 1 0", "output": "Yes\nNo\nYes\nNo\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "6\n1 2 0 15 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string s.\nAmong... | [{"type": "stdin_stdout", "input": "atcoderandatcodeer\n5\n", "output": "andat\n"}, {"type": "stdin_stdout", "input": "atcoderamdatcodeer\n5", "output": "amdat\n"}, {"type": "stdin_stdout", "input": "roddadtadmaoefectr\n5", "output": "admao\n"}, {"type": "stdin_stdout", "input": "atcoderamdascodeer\n5", "output": "amda... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKate likes to count words in tex... | [{"input": "\"Really2374239847 long ^&#$&(*@# sequence\"", "output": "[3]", "fn_name": "word_count"}, {"input": "\"Hello there, little user5453 374 ())$.\"", "output": "[4]", "fn_name": "word_count"}, {"input": "\"Slow-moving user6463 has been here\"", "output": "[6]", "fn_name": "word_count"}, {"input": "\"I'd like to... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an array A of N numbers, f... | [{"type": "stdin_stdout", "input": "10\n807\n935399 145100 -386862 856283 628359 256963 -461034 935399 776945 -759500 -759500 935399 -967263 649644 -24686 -452785 -352467 688773 908612 -386862 -479957 -146506 439811 -506538 -146506 145100 -461034 935399 -352307 -181185 740341 740341 439811 742466 -854789 700140 -740255... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "6\n8\n1 1 4 2 1 2 1 1\n3\n1 3 12\n4\n1 10 10 1\n1\n26\n2\n2 4\n3\n2 1 1\n", "output": "6\n1\n4\n1\n1\n2\n"}, {"type": "stdin_stdout", "input": "6\n8\n1 1 2 2 3 2 1 1\n3\n1 3 3\n4\n1 10 10 1\n1\n26\n2\n2 1\n3\n1 1 1\n", "output": "7\n2\n4\n1\n1\n3\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\nA permutation is a sequence of i... | [{"type": "stdin_stdout", "input": "5 4\n1 2 5\n2 3\n1 1 3\n1 3 4\n", "output": "14\n7\n9\n"}, {"type": "stdin_stdout", "input": "4 4\n1 2 4\n2 3\n1 1 2\n1 1 4\n", "output": "9\n4\n10\n"}, {"type": "stdin_stdout", "input": "5 4\n1 1 4\n2 5\n1 1 2\n1 3 4\n", "output": "10\n3\n9\n"}, {"type": "stdin_stdout", "input": "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\nOnce Vasya and Petya assembled a... | [{"type": "stdin_stdout", "input": "25\n-611859852 0\n-611859842 0\n-611859837 0\n-611859843 0\n-611859863 0\n-611859851 0\n-611859857 0\n-611859858 0\n-611859845 0\n-611859865 0\n-611859836 0\n-611859839 0\n-611859850 0\n-611859854 0\n-611859838 0\n-611859840 0\n-611859860 0\n-611859853 0\n-611859848 0\n-611859844 0\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBessie the cow has just intercep... | [{"type": "stdin_stdout", "input": "abcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklyyyyyyymnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcdefghijklzzzzzzzmnopqrstuvwxabcde... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 probably know, Fibonacci ... | [{"input": "193150", "output": "[5]", "fn_name": "get_last_digit"}, {"input": "193241", "output": "[1]", "fn_name": "get_last_digit"}, {"input": "20001", "output": "[6]", "fn_name": "get_last_digit"}, {"input": "99999", "output": "[6]", "fn_name": "get_last_digit"}, {"input": "1001", "output": "[1]", "fn_name": "get_la... | 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\nKoa the Koala has a binary strin... | [{"type": "stdin_stdout", "input": "0100111100100101001101111001011101011001111100110111101110001001010111100010011100011011101111010111111010010101000001110110111110010001100010101110111111000011101110000000001101010011000111111100000000000000001010011111010111\n", "output": "975171002\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\nA new task for you!\n\nYou have ... | [{"input": "\"09:10:01\"", "output": "[\"09:10:01\"]", "fn_name": "time_correct"}, {"input": "\"11:70:10\"", "output": "[\"12:10:10\"]", "fn_name": "time_correct"}, {"input": "\"19:99:99\"", "output": "[\"20:40:39\"]", "fn_name": "time_correct"}, {"input": "\"24:01:01\"", "output": "[\"00:01:01\"]", "fn_name": "time_co... | 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 the first step to unders... | [{"input": "5", "output": "[[1, 2, 3, 4, 5]]", "fn_name": "pre_fizz"}, {"input": "4", "output": "[[1, 2, 3, 4]]", "fn_name": "pre_fizz"}, {"input": "3", "output": "[[1, 2, 3]]", "fn_name": "pre_fizz"}, {"input": "2", "output": "[[1, 2]]", "fn_name": "pre_fizz"}, {"input": "1", "output": "[[1]]", "fn_name": "pre_fizz"}] | 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 has a string $s$ of length... | [{"type": "stdin_stdout", "input": "99\n101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1000000000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Japan, people make offerings ... | [{"type": "stdin_stdout", "input": "100\nP P P G G P P P G G P P G G P G W G W G G G P G P P G P P P G G G P P G P G P P G P P G G G W G G G P P P W G P G G P G G G G G P P W P G G G G G P P G G P G P G G G G P G G G G W P G P P P G G P G P\n", "output": "Three\n"}, {"type": "stdin_stdout", "input": "100\nG G G G G W W... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a natural number n, we wan... | [{"input": "60", "output": "[[10, [2, 2, 3, 5]]]", "fn_name": "prod_int_part"}, {"input": "54", "output": "[[6, [2, 3, 3, 3]]]", "fn_name": "prod_int_part"}, {"input": "18", "output": "[[3, [2, 3, 3]]]", "fn_name": "prod_int_part"}, {"input": "37", "output": "[[0, []]]", "fn_name": "prod_int_part"}, {"input": "61", "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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "3\n5 2\n1 9 -9 25 1\n5 1\n4 17 -10 25 2\n3 0\n1 0 0", "output": "1.0\n7.66666666667\n0.333333333333\n"}, {"type": "stdin_stdout", "input": "3\n5 1\n1 9 -19 52 1\n5 0\n3 9 -10 25 0\n3 0\n0 1 1", "output": "3.66666666667\n5.4\n0.666666666667\n"}, {"type": "stdin_stdout", "input": "3\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\nChef loves arrays. But he really... | [{"type": "stdin_stdout", "input": "1018", "output": "857373624\n"}, {"type": "stdin_stdout", "input": "200", "output": "120529249\n"}, {"type": "stdin_stdout", "input": "140", "output": "119877472\n"}, {"type": "stdin_stdout", "input": "320", "output": "398506989\n"}, {"type": "stdin_stdout", "input": "147", "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\nJulia is going to cook a chicken... | [{"type": "stdin_stdout", "input": "312200625484460654 543737694709247394 1000000000000000000\n", "output": "\n1231537069224786756.000000000000\n"}, {"type": "stdin_stdout", "input": "81413279254461199 310548139128293806 1000000000000000000\n", "output": "\n1572837149684581510.000000000000\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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "3\n10:00\n09:00\n14\n10:00\n08:00\n151\n10:00\n09:00\n167", "output": "74.0 60.0\n271.0 211.0\n227.0 197.0\n"}, {"type": "stdin_stdout", "input": "3\n10:00\n09:00\n20\n10:00\n08:00\n151\n10:00\n09:00\n167", "output": "80.0 60.0\n271.0 211.0\n227.0 197.0\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\nIt is well known that the planet... | [{"type": "stdin_stdout", "input": "104 54\n683 252 125 813 874 835 651 424 826 139 397 323 143 153 326 941 536 435 317 854 353 222 851 591 420 415 190 872 178 311 612 635 174 505 153 81 559 815 805 414 378 62 75 929 208 942 254 670 329 671 127 494 504 618 292 699 203 959 218 788 285 602 83 104 41 562 272 806 4 582 780... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGoldbach's Conjecture: For any e... | [{"type": "stdin_stdout", "input": "6\n10\n14\n0", "output": "1\n2\n2\n"}, {"type": "stdin_stdout", "input": "6\n1\n12\n0", "output": "1\n0\n1\n"}, {"type": "stdin_stdout", "input": "6\n10\n8\n0", "output": "1\n2\n1\n"}, {"type": "stdin_stdout", "input": "6\n4\n12\n0", "output": "1\n1\n1\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\nImagine two rings with numbers o... | [{"input": "2\n3", "output": "[5]", "fn_name": "spinning_rings"}, {"input": "3\n2", "output": "[2]", "fn_name": "spinning_rings"}, {"input": "1\n1", "output": "[1]", "fn_name": "spinning_rings"}, {"input": "2\n2", "output": "[3]", "fn_name": "spinning_rings"}, {"input": "3\n3", "output": "[2]", "fn_name": "spinning_rin... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven are N positive integers A_... | [{"type": "stdin_stdout", "input": "10000\n996426 991040 991394 993249 993789 994392 991787 998270 994534 999447 995337 997096 996535 997215 994454 999779 998240 991404 991682 999870 990794 994313 993602 993869 997730 991987 994764 993847 993506 990653 996555 994126 992060 995401 997275 995702 995833 993070 990511 9917... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "6\n1 1\n2 4\n3 16\n4 16\n4 1\n1 4", "output": "0\n1\n5\n2\n2\n2\n"}, {"type": "stdin_stdout", "input": "6\n2 1\n2 1\n3 8\n14 16\n1 1\n2 4", "output": "1\n1\n4\n7\n0\n1\n"}, {"type": "stdin_stdout", "input": "6\n1 2\n2 4\n5 4\n16 32\n3 2\n1 8", "output": "1\n1\n2\n1\n2\n3\n"}, {"type"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have two variables a and b. ... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "1000000000000000000 1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1100000000000000000 1000000000000000000\n", "output": "1100000000000000000 1000000000000000000\n"}, {"type": "stdin_stdout", "input": "11000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 problem uses a simplified TC... | [{"type": "stdin_stdout", "input": "15 8\n244.1.125.160\n39.50.68.162\n142.253.101.137\n52.239.241.147\n194.4.189.143\n200.238.160.30\n245.78.177.243\n89.249.140.19\n169.51.142.22\n123.246.20.99\n133.44.192.119\n226.240.179.30\n76.209.211.184\n98.15.6.117\n227.219.117.153\n", "output": "-1\n"}, {"type": "stdin_stdout",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# RoboScript #3 - Implement the ... | [{"input": "\"((F3)10(F2)11)10\"", "output": "[\"*******************************************************************************************************************************************************************************************************************************************************************************... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integer number... | [{"type": "stdin_stdout", "input": "19 100000000000000000\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "19 522119050105040403\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "19 999999999999999999\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "19 11111111111111111\n", "output": "-1\n"}, {"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven are N integers A_1,\\ldots... | [{"type": "stdin_stdout", "input": "4\n141421356 17320508 22360679 244949\n", "output": "437235829\n"}, {"type": "stdin_stdout", "input": "4\n141421356 17320508 22360679 176612", "output": "432841470\n"}, {"type": "stdin_stdout", "input": "4\n141421356 17320508 44188846 176612", "output": "442072669\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\nJoisino is planning to open a sh... | [{"type": "stdin_stdout", "input": "3\n1 1 1 1 1 1 0 0 1 1\n0 1 0 1 1 0 1 0 1 0\n1 0 1 1 0 0 0 1 0 1\n-8 6 -2 -11 -12 4 14 9 -6 2 2\n-9 2 0 1 7 -5 0 -2 -6 5 5\n6 -6 9 -9 12 -5 8 0 -9 -7 -7", "output": "33\n"}, {"type": "stdin_stdout", "input": "3\n1 1 1 1 1 1 0 0 0 0\n0 1 0 1 1 1 1 0 1 0\n1 0 1 1 0 1 0 1 0 1\n-8 6 -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\nA rectangle with sides $A$ and $... | [{"type": "stdin_stdout", "input": "2\n2 2 20\n2 10 40\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "2\n2 2 20\n1 10 11\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2\n2 2 35\n1 10 11\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "2\n2 3 20\n2 4 40\n", "output": "6\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\nConsider a tunnel on a one-way r... | [{"type": "stdin_stdout", "input": "7\n5 2 3 6 7 1 4\n2 3 6 7 1 4 5\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "7\n5 2 3 6 7 1 4\n2 3 6 7 1 4 5\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "5\n3 5 2 1 4\n4 3 2 5 1\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "5\n3 5 2 1 4\n4 3 2 5 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\nThere are n banks in the city wh... | [{"type": "stdin_stdout", "input": "50\n108431864 128274949 -554057370 -384620666 -202862975 -803855410 -482167063 -55139054 -215901009 0 0 0 0 0 94325701 730397219 358214459 -673647271 -131397668 -377892440 0 0 0 0 0 -487994257 -360271553 639988328 489338210 -281060728 250208758 0 993242346 -213071841 -59752620 -86435... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 undirected grap... | [{"type": "stdin_stdout", "input": "18\n626 619 11 809 967 233 474 747 648 256 397 174 705 695 520 682 402 925\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "18\n58 40 14 8 86 29 5 50 24 42 96 53 72 54 95 62 30 77\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "18\n5 8 3 8 9 10 7 10 2 7 3 2 1 10 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\nThere are n servers in a laborat... | [{"type": "stdin_stdout", "input": "1 10\n4 1 1\n9 1 1\n10 1 1\n12 1 1\n13 1 1\n15 1 1\n16 1 1\n18 1 1\n19 1 1\n20 1 1\n", "output": "1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n"}, {"type": "stdin_stdout", "input": "1 10\n4 1 1\n9 1 1\n10 1 1\n12 1 1\n13 1 1\n15 1 1\n16 1 1\n18 1 1\n19 1 1\n20 1 1\n", "output": "1\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\nCengiz recently learned Fibonacc... | [{"type": "stdin_stdout", "input": "10\n669924290 408119795 804030560\n663737793 250734602 29671646\n431160679 146708815 289491233\n189259304 606497663 379372476\n707829111 49504411 81710658\n54555019 65618101 626948607\n578351356 288589794 974275296\n400531973 205638174 323247740\n219131617 178762989 799964854\n825160... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBike loves looking for the secon... | [{"type": "stdin_stdout", "input": "10\n29272229 8752316 10025994 52398694 16706314 49609605 28150935 102254532 44865054 87041483\n", "output": "129354579\n"}, {"type": "stdin_stdout", "input": "10\n4547989 39261040 185956581 38131456 26174500 1101740 71295827 77784626 155701452 61318416\n", "output": "263691991\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\nHolidays are coming up really so... | [{"type": "stdin_stdout", "input": "6\n4 7\n...*...\n..***..\n.****..\n*******\n6 10\n....*.*...\n...*****..\n..*******.\n.********.\n********.*\n**********\n5 5\n*...*\n**.**\n*****\n**.**\n*...*\n5 6\n.*....\n.**...\n.***..\n.****.\n.*****\n3 3\n*.*\n...\n*.*\n2 4\n.**.\n****\n", "output": "24\n89\n19\n22\n4\n8\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\nPetya and Vasya arranged a game.... | [{"type": "stdin_stdout", "input": "92 69\n1 76\n1 14\n1 15\n0\n1 46\n1 80\n0\n0\n1 77\n0\n1 53\n1 81\n1 61\n1 40\n0\n1 20\n1 71\n1 24\n1 54\n1 82\n1 23\n0\n1 63\n1 25\n1 38\n1 68\n0\n1 65\n0\n1 76\n1 55\n1 87\n1 1\n1 37\n1 68\n1 30\n1 17\n1 19\n0\n1 16\n1 69\n0\n1 60\n1 86\n0\n1 44\n1 32\n1 10\n1 8\n0\n0\n0\n0\n0\n1 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nI, Fischl, Prinzessin der Verurt... | [{"type": "stdin_stdout", "input": "3\n28\nqaabzwsxedcrfvtgbyhnujmiklop\n13\ncleanairactbd\n10\naannttoonn\n", "output": "\nac\nf\nb\n"}, {"type": "stdin_stdout", "input": "4\n5\noisha\n10\niloveoisha\n16\nshahromloveoisha\n16\noishaloveshahrom\n", "output": "b\nb\nb\nb\n"}, {"type": "stdin_stdout", "input": "4\n5\nais... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolar bears Menshykov and Uslada... | [{"type": "stdin_stdout", "input": "1000000000000\n", "output": "272165"}, {"type": "stdin_stdout", "input": "225849940487\n", "output": "129343\n"}, {"type": "stdin_stdout", "input": "542905489591\n", "output": "200537\n"}, {"type": "stdin_stdout", "input": "376593918338\n", "output": "167021\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\nYou have an initially empty caul... | [{"type": "stdin_stdout", "input": "100\n2\n36\n43\n19\n99\n100\n98\n9\n79\n57\n1\n78\n56\n14\n66\n93\n62\n50\n76\n33\n25\n41\n15\n61\n97\n33\n51\n97\n95\n96\n83\n53\n12\n77\n87\n85\n37\n72\n82\n70\n44\n69\n58\n52\n48\n73\n21\n24\n20\n8\n31\n32\n45\n55\n29\n13\n28\n49\n60\n54\n90\n86\n94\n10\n71\n47\n40\n74\n80\n23\n26... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAiz, which is located in cybersp... | [{"type": "stdin_stdout", "input": "5\n18\n102\n-181\n53\n9", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n18\n102\n-155\n53\n9", "output": "3\n"}, {"type": "stdin_stdout", "input": "5\n18\n146\n-181\n53\n9", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n33\n146\n-181\n53\n9", "output": "0\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\nThe first algorithm for detectin... | [{"type": "stdin_stdout", "input": "100 1\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nW\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB\nB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves football very much, ... | [{"type": "stdin_stdout", "input": "100\n2382 7572 9578 1364 2325 2929 7670 5574 2836 2440 6553 1751 929 8785 6894 9373 9308 7338 6380 9541 9951 6785 13181 9942 5087 7544 6582 7139 8458 7424 9759 8199 9464 8817 7625 6200 4955 9373 9500 3062 849 4210 9337 5466 2190 8150 4971 3145 869 5675 1975 161 1998 378 5229 9000 895... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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### Preface\nYou are currently w... | [{"input": "[[7, 66], [71, 7], [0, 94], [16, 93], [33, 49], [49, 81], [17, 2], [95, 71], [32, 14], [31, 41], [92, 72], [12, 79]]\n[{\"y\": 38, \"x\": 32, \"id\": 1}, {\"y\": 49, \"x\": 73, \"id\": 2}, {\"y\": 85, \"x\": 50, \"id\": 3}, {\"y\": 2, \"x\": 79, \"id\": 4}, {\"y\": 20, \"x\": 44, \"id\": 5}, {\"y\": 56, \"x... | 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\nOnce a Mathematician was trapped... | [{"type": "stdin_stdout", "input": "952\n2320756\n29322199\n69962176\n35597905\n77503600\n16044585\n78680494\n87353756\n46901578\n54533600\n56732835\n52356252\n3139727\n67375042\n39918429\n47546657\n55270670\n75055313\n37482942\n4607646\n3592454\n42195046\n6958164\n92680150\n74100365\n67455070\n78497675\n79514245\n3736... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer N. Buil... | [{"type": "stdin_stdout", "input": "4", "output": "4\n1 2\n1 3\n2 4\n3 4\n"}, {"type": "stdin_stdout", "input": "4", "output": "4\n1 2\n1 3\n2 4\n3 4\n"}, {"type": "stdin_stdout", "input": "3", "output": "2\n1 3\n2 3"}, {"type": "stdin_stdout", "input": "000", "output": "0\n"}, {"type": "stdin_stdout", "input": "001", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this kata, you will do additi... | [{"input": "\"1plus2minus3plus4minus5\"", "output": "[\"-1\"]", "fn_name": "calculate"}, {"input": "\"1minus2minus3minus4\"", "output": "[\"-8\"]", "fn_name": "calculate"}, {"input": "\"1minus2plus3minus4\"", "output": "[\"-2\"]", "fn_name": "calculate"}, {"input": "\"1plus2plus3plus4\"", "output": "[\"10\"]", "fn_name... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ students numerated... | [{"type": "stdin_stdout", "input": "96 15 21\n76 26 108 220 384 4 170 198 568 571 2 193 244 359 78 133 107 340 110 135 565 341 109 572 243 138 357 52 293 344 595 105 569 362 639 134 82 356 27 137 194 291 499 104 28 290 197 477 339 50 288 289 160 54 358 640 343 542 566 79 136 385 3 641 195 355 361 169 196 429 242 162 33... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have a tree of $n$ vertices.... | [{"type": "stdin_stdout", "input": "28\n2 24\n2 4\n2 3\n1 2\n1 17\n1 21\n1 22\n10 22\n22 23\n22 26\n25 26\n16 25\n7 26\n5 7\n5 8\n5 15\n5 14\n5 12\n10 20\n11 4\n9 25\n6 9\n12 19\n9 28\n13 14\n18 28\n27 28\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "28\n2 24\n2 4\n2 3\n1 2\n1 17\n1 21\n1 22\n10 22\n22 23\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 + B is often used as an exampl... | [{"type": "stdin_stdout", "input": "1094 350\n", "output": "1444\n"}, {"type": "stdin_stdout", "input": "1132 485\n", "output": "1617\n"}, {"type": "stdin_stdout", "input": "1062 519\n", "output": "1581\n"}, {"type": "stdin_stdout", "input": "260 1041\n", "output": "1301\n"}, {"type": "stdin_stdout", "input": "1132 306... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nLet's say we have a p... | [{"input": "1152\n3", "output": "[12]", "fn_name": "mul_power"}, {"input": "100\n3", "output": "[10]", "fn_name": "mul_power"}, {"input": "72\n4", "output": "[18]", "fn_name": "mul_power"}, {"input": "36\n2", "output": "[1]", "fn_name": "mul_power"}, {"input": "5\n2", "output": "[5]", "fn_name": "mul_power"}] | 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_A mad sociopath scientist just ... | [{"input": "\"Albert Einstein, !Sarah Connor, Marilyn Monroe, Abraham Lincoln, Sarah Connor, Sean Connery, Marilyn Monroe, Bjarne Stroustrup, Manson Marilyn, Monroe Mary\"", "output": "[\"Albert Einstein, Abraham Lincoln, Sean Connery, Bjarne Stroustrup, Manson Marilyn, Monroe Mary\"]", "fn_name": "select"}, {"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\nYou play a computer game. Your c... | [{"type": "stdin_stdout", "input": "21 21\n.....X...X.........X.\n...X...XX......X.....\n..X........X.X...XX..\n.........X....X...X..\nX...X...........XX...\n...X...X....XX...XXX.\n.X............X......\n......X.X............\n.X...X.........X.X...\n......XX......X.X....\n....X.......X.XXX....\n.X.......X..XXX.X..X.\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\nLucy loves to travel. Luckily sh... | [{"input": "[\"Mexico City\", \"Dubai\", \"Philadelphia\", \"Madrid\", \"Houston\", \"Chicago\", \"Delhi\", \"Seoul\", \"Mumbai\", \"Lisbon\", \"Hong Kong\", \"Brisbane\", \"Stockholm\", \"Tokyo\", \"San Francisco\", \"Rio De Janeiro\"]\n[\"Lisbon\", \"Mexico City\"]", "output": "[\"No worthwhile conferences this year!... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string S consist... | [{"type": "stdin_stdout", "input": "qbdp", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "dqpb", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "dpqb", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "bpqd", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "bqpd", "output": "Yes\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\nAmr bought a new video game \"Gu... | [{"type": "stdin_stdout", "input": "4 3\n4 10 14 1\n3 7 6 0\n2 3 3 1\n", "output": "Data not sufficient!\n"}, {"type": "stdin_stdout", "input": "4 3\n4 10 26 1\n3 7 6 0\n2 3 3 1\n", "output": "Data not sufficient!\n"}, {"type": "stdin_stdout", "input": "4 3\n4 10 23 1\n3 7 6 0\n2 3 3 1\n", "output": "Data not sufficien... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an integer sequence A ... | [{"type": "stdin_stdout", "input": "10\n10 102 113 60 6 47 23 25 52 118", "output": "58\n"}, {"type": "stdin_stdout", "input": "10\n10 102 113 60 6 90 16 25 52 118", "output": "61\n"}, {"type": "stdin_stdout", "input": "10\n10 102 113 72 6 90 16 25 52 118", "output": "73\n"}, {"type": "stdin_stdout", "input": "10\n10 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn April 2008, Aizuwakamatsu Cit... | [{"type": "stdin_stdout", "input": "17 5128 240 126 32\n20 4907 303 151 7\n60 73980 2086 337 15\n3 3216 562 010 6\n40 8478 221 53 307\n23 27966 5 92 13\n50 107893 4497 65 20\n199 88677 2825 226 8\n0", "output": "21 0\n7 18\n15 126\n5 40\n37 5\n13 303\n20 276\n8 292\n"}, {"type": "stdin_stdout", "input": "49 5128 240 25... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 problem is same as the prev... | [{"type": "stdin_stdout", "input": "10\n30518 30518 30518 30518 30518 30518 30518 30518 30518 30518\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "10\n30518 30518 30518 30518 30518 30518 30518 30518 30518 30518\n", "output": "10"}, {"type": "stdin_stdout", "input": "10\n30518 96518 74071 59971 50121 4862 439... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 is to create function`... | [{"input": "-100\n-25\n10", "output": "[true]", "fn_name": "is_divide_by"}, {"input": "10000\n5\n-3", "output": "[false]", "fn_name": "is_divide_by"}, {"input": "-96\n25\n17", "output": "[false]", "fn_name": "is_divide_by"}, {"input": "48\n2\n-5", "output": "[false]", "fn_name": "is_divide_by"}, {"input": "12\n-3\n4", ... | 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\nVova is playing a computer game.... | [{"type": "stdin_stdout", "input": "20\n1000000001 510000100 2 1\n1000000000 500000000 2 1\n1000000000 500000000 2 1\n1000000000 500000000 2 1\n1000000000 500000000 2 1\n1000000000 684100035 2 1\n1000000100 500000000 2 1\n1000000000 690764083 2 1\n1000000000 500000000 2 1\n1000000000 167868648 2 1\n1000000001 999999995... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAtCoDeer the deer is seeing a qu... | [{"type": "stdin_stdout", "input": "5\n3 10\n48 17\n31 199\n231 23\n3 2\n", "output": "6930\n"}, {"type": "stdin_stdout", "input": "5\n3 10\n48 28\n31 199\n300 23\n3 4", "output": "12600\n"}, {"type": "stdin_stdout", "input": "5\n3 11\n87 28\n31 199\n300 23\n3 2", "output": "13000\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\nWelcome to Codeforces Stock Exch... | [{"type": "stdin_stdout", "input": "29 30 989\n450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 450 434\n451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451 451\n", "output": "1023\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\nArya has n opponents in the scho... | [{"type": "stdin_stdout", "input": "1 100\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLocal authorities have heard a l... | [{"type": "stdin_stdout", "input": "69 6 15\n3845 22036 69001 38625 10662 85485 88195 12883 2257 101913 40235 87797 15559 15841 74716 92979 167517 49466 68603 123491 99905 35606 65184 98603 68232 54398 105580 63002 38979 41488 9636 24737 15892 173020 69670 29711 1460 473 32171 717 21097 108932 86760 55720 116079 61122 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a sequence of posi... | [{"type": "stdin_stdout", "input": "4\n1101111010 1000000000 1000010000 1001001010\n", "output": "4\n1101111010 1000000000 1000010000 1001001010\n"}, {"type": "stdin_stdout", "input": "4\n1101111010 1000000000 1100010000 1001001010\n", "output": "4\n1101111010 1000000000 1100010000 1001001010\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\nFast & Furious Driving School's ... | [{"input": "273", "output": "[100]", "fn_name": "cost"}, {"input": "102", "output": "[50]", "fn_name": "cost"}, {"input": "45", "output": "[30]", "fn_name": "cost"}, {"input": "63", "output": "[30]", "fn_name": "cost"}, {"input": "84", "output": "[40]", "fn_name": "cost"}] | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet us define the FizzBuzz seque... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "266666333332\n"}, {"type": "stdin_stdout", "input": "999997\n", "output": "266665333334\n"}, {"type": "stdin_stdout", "input": "870108\n", "output": "201890463153\n"}, {"type": "stdin_stdout", "input": "1100000", "output": "322667033332\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\nOne of the first algorithm used ... | [{"input": "9094947017729282379150390625\n1", "output": "[52]", "fn_name": "int_rac"}, {"input": "125348981764\n356243", "output": "[3]", "fn_name": "int_rac"}, {"input": "835871232077058\n1", "output": "[30]", "fn_name": "int_rac"}, {"input": "246391990316004\n1", "output": "[29]", "fn_name": "int_rac"}, {"input": "40... | 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 positive integer X is said to ... | [{"type": "stdin_stdout", "input": "100000\n", "output": "3234566667\n"}, {"type": "stdin_stdout", "input": "94598\n", "output": "2345654334\n"}, {"type": "stdin_stdout", "input": "91278\n", "output": "2332345676\n"}, {"type": "stdin_stdout", "input": "97979\n", "output": "3223456555\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\nWrite a program which reads a $n... | [{"type": "stdin_stdout", "input": "4 0 13\n1 1\n2 4\n4 15\n-1 0 2\n1 5 2", "output": "0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0 0 0 0\n"}, {"type": "stdin_stdout", "input": "4 0 12\n1 1\n-1 2\n4 1\n1 0 -1\n1 12 5", "output": "0 0 0 0 0 0 0 0 0 0 0 0\n0 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\nWrite a function which converts ... | [{"input": "\"1,2,3 hello world!\"", "output": "[\"1,2,3 HELLO WORLD!\"]", "fn_name": "make_upper_case"}, {"input": "\"hello world !\"", "output": "[\"HELLO WORLD !\"]", "fn_name": "make_upper_case"}, {"input": "\"heLlO wORLd !\"", "output": "[\"HELLO WORLD !\"]", "fn_name": "make_upper_case"}, {"input": "\"hello world... | 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 set of cards with pos... | [{"type": "stdin_stdout", "input": "3\n2 21\n0 48\n-1 12", "output": "-1152\n"}, {"type": "stdin_stdout", "input": "3\n4 21\n0 48\n-1 12", "output": "-2304\n"}, {"type": "stdin_stdout", "input": "3\n4 21\n0 28\n-1 12", "output": "-1344\n"}, {"type": "stdin_stdout", "input": "3\n6 93\n1 -14\n1 -1", "output": "-7728\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\nAika's house runs a small coffee... | [{"type": "stdin_stdout", "input": "5 11\n7 36 34 14 94\n8 10\n-1 2 1 5 6 6 8 2\n5 4\n2 4 2 4 6\n10 18\n10 15 12 56 12 33 11 1 22 181\n1 101\n10\n0 0", "output": "10\n9\n2\n17\n10\n"}, {"type": "stdin_stdout", "input": "5 11\n7 36 34 45 94\n8 10\n-1 2 1 5 4 6 8 2\n5 2\n2 4 2 4 6\n10 18\n10 15 12 56 12 67 11 6 22 181\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\n-----Input-----\n\nThe input con... | [{"type": "stdin_stdout", "input": "64\n", "output": "267\n"}, {"type": "stdin_stdout", "input": "16\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "24\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "32\n", "output": "51\n"}, {"type": "stdin_stdout", "input": "36\n", "output": "14\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\nWell, those numbers were right a... | [{"input": "0\n1\n2\n3\n4\n5\n6\n7\n22\n9", "output": "[false]", "fn_name": "is_narcissistic"}, {"input": "0\n1\n2\n3\n4\n5\n6\n7\n8\n9", "output": "[true]", "fn_name": "is_narcissistic"}, {"input": "\"4\"\n7\n\"9\"", "output": "[true]", "fn_name": "is_narcissistic"}, {"input": "5\n\"\"\n407", "output": "[false]", "fn_... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLate last night in the Tanner ho... | [{"input": "\"..........\\n..........\\n.......X..\\n..........\\n..........\"", "output": "[[7, 2]]", "fn_name": "find_spaceship"}, {"input": "\"..........\\n..........\\n..........\\n........X.\\n..........\"", "output": "[[8, 1]]", "fn_name": "find_spaceship"}, {"input": "\"........................\"", "output": "[\... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n\nChristmas is coming. I... | [{"input": "\"dbdbebedbddbedededeeddbbdeddbeddeebdeddeebbbb\"", "output": "[\"deededebddeebeddeddeddbddeddeddebeeddbededeed\"]", "fn_name": "center_of"}, {"input": "\"vttussvutvuvvtustsvsvtvu\"", "output": "[\"vsvvtvvtvvsv\"]", "fn_name": "center_of"}, {"input": "\"aaaaaaaaaaaaaa\"", "output": "[\"a\"]", "fn_name": "ce... | 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 became interested in bioin... | [{"type": "stdin_stdout", "input": "318\nTATCAATCGGTACGTGCGCATCATTGTCAATCGGGCTTCATGGCTTGCGGGCGCTACCCGAGGGGAAGCTGCGGACAGGTAGGTAAGATACACACGAACCAAACGGAGTTATGTTGGATAAATTGGCTGGAAGGGCGTAGGTATATCGAGTCGCGGACCTGGCATAGACTATCAGGGGCAGCGGTACAAGGCAACCGTGAGCGGGGTCTGCCCACCATTAGACCGATGCGCCGGCTCGTATATGTGATTCTGGTGAAAAGTATCATGCCGGGACGCGTA... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 children in AtCoder ... | [{"type": "stdin_stdout", "input": "-465", "output": "107880\n"}, {"type": "stdin_stdout", "input": "-792", "output": "313236\n"}, {"type": "stdin_stdout", "input": "-937", "output": "438516\n"}, {"type": "stdin_stdout", "input": "-845", "output": "356590\n"}, {"type": "stdin_stdout", "input": "-647", "output": "208981... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 kindergarten teacher Natalia P... | [{"type": "stdin_stdout", "input": "102\n", "output": "2 4 7 11 16 22 29 37 46 56 67 79 92 4 19 35 52 70 89 7 28 50 73 97 20 46 73 101 28 58 89 19 52 86 19 55 92 28 67 5 46 88 29 73 16 62 7 55 2 52 1 53 4 58 11 67 22 80 37 97 56 16 79 41 4 70 35 1 70 38 7 79 50 22 97 71 46 22 101 79 58 38 19 1 86 70 55 41 28 16 5 97 88... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nI found this interesting intervi... | [{"input": "100", "output": "[5]", "fn_name": "how_many_measurements"}, {"input": "1", "output": "[0]", "fn_name": "how_many_measurements"}, {"input": "2", "output": "[1]", "fn_name": "how_many_measurements"}, {"input": "3", "output": "[1]", "fn_name": "how_many_measurements"}, {"input": "8", "output": "[2]", "fn_name"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day, after a difficult lectu... | [{"type": "stdin_stdout", "input": "101628400788615604 30\n", "output": "999999999999995905\n"}, {"type": "stdin_stdout", "input": "101628400798615604 31\n", "output": "981546175132942729\n"}, {"type": "stdin_stdout", "input": "101628400798615604 31\n", "output": "981546175132942729\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 have full control over a rob... | [{"type": "stdin_stdout", "input": "11 5\nFORWARD 3\nRIGHT\nFORWARD 10\nLEFT\nBACKWARD 3\nSTOP\n3 1\nFORWARD 2\nSTOP\n0 0", "output": "11 1\n1 1\n"}, {"type": "stdin_stdout", "input": "14 5\nFORWARD 3\nRIGHT\nFORWARD 8\nLEFT\nBACKWARD 2\nSTOP\n3 1\nFORVARD 5\nSTOP\n0 0", "output": "9 2\n1 1\n"}, {"type": "stdin_stdout"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this Kata we are passing a nu... | [{"input": "222222221", "output": "[false]", "fn_name": "is_even"}, {"input": "500000000", "output": "[true]", "fn_name": "is_even"}, {"input": "0.5", "output": "[false]", "fn_name": "is_even"}, {"input": "15", "output": "[false]", "fn_name": "is_even"}, {"input": "220", "output": "[true]", "fn_name": "is_even"}, {"inp... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a 3×3 square grid, where... | [{"type": "stdin_stdout", "input": "ant\nobe\nrec\n", "output": "abc\n"}, {"type": "stdin_stdout", "input": "edu\ncat\nion\n", "output": "ean\n"}, {"type": "stdin_stdout", "input": "ant\nobe\nrfc", "output": "abc\n"}, {"type": "stdin_stdout", "input": "ddu\ncat\nion", "output": "dan\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\nOur beloved detective, Sherlock ... | [{"type": "stdin_stdout", "input": "bwyplnjn zkms\n26\nzkms nzmcsytxh\nnzmcsytxh yujsb\nbwyplnjn gtbzhudpb\ngtbzhudpb hpk\nyujsb xvy\nhpk wrwnfokml\nwrwnfokml ndouuikw\nndouuikw ucgrja\nucgrja tgfmpldz\nxvy nycrfphn\nnycrfphn quvs\nquvs htdy\nhtdy k\ntgfmpldz xtdpkxm\nxtdpkxm suwqxs\nk fv\nsuwqxs qckllwy\nqckllwy diun\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Resistance is trying to take... | [{"type": "stdin_stdout", "input": "24\n19 14\n8 15\n13 4\n18 16\n1 17\n10 3\n22 21\n10 14\n6 11\n9 12\n15 22\n11 3\n21 7\n2 12\n7 4\n4 19\n16 9\n24 17\n5 15\n8 2\n23 10\n20 12\n18 24\n", "output": "1 20 21 22 23 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24\n"}, {"type": "stdin_stdout", "input": "24\n19 14\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will be given ... | [{"input": "[5, 17, 18, 11, 13, 18, 11, 13]", "output": "[22]", "fn_name": "repeats"}, {"input": "[16, 0, 11, 4, 8, 16, 0, 11]", "output": "[12]", "fn_name": "repeats"}, {"input": "[9, 10, 19, 13, 19, 13]", "output": "[19]", "fn_name": "repeats"}, {"input": "[5, 10, 19, 13, 10, 13]", "output": "[24]", "fn_name": "repea... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPolycarp is very careful. He eve... | [{"type": "stdin_stdout", "input": ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n", "output": ", , , , , , ,... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou survived several months of e... | [{"type": "stdin_stdout", "input": "9\n315\n0", "output": "2\n11\n"}, {"type": "stdin_stdout", "input": "9\n256\n0", "output": "2\n0\n"}, {"type": "stdin_stdout", "input": "9\n160\n0", "output": "2\n1\n"}, {"type": "stdin_stdout", "input": "9\n213\n0", "output": "2\n3\n"}, {"type": "stdin_stdout", "input": "9\n200\n0",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer array $... | [{"type": "stdin_stdout", "input": "50\n170081 797965 40736 224325 102476 20832 954026 923972 391400 247099 95141 927386 79799 749285 104039 200818 623552 872203 355273 838168 352783 850365 389351 930945 847154 608047 727586 549184 520573 608953 338849 536466 345479 589848 882827 771475 874283 787115 992590 128903 9780... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 crop circle suddenly appeared ... | [{"type": "stdin_stdout", "input": "4\n6 4 2\n4 7 3\n7 10 3\n13 6 1\n4\n7 4 2\n4 7 3\n7 10 3\n11 6 3\n0", "output": "39.664699289572\n45.627024663706"}, {"type": "stdin_stdout", "input": "4\n3 4 1\n4 7 3\n12 14 3\n13 3 1\n4\n7 4 2\n4 7 3\n6 10 3\n11 6 3\n0", "output": "45.836887586\n48.016187138\n"}, {"type": "stdin_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\nPolycarp is very fond of playing... | [{"type": "stdin_stdout", "input": "3\n\n5 0\n0 0 1\n-1 1 4\n1 1 2\n1 0 3\n2 2 9\n\n5 2\n0 -1 1\n0 1 4\n2 0 2\n1 1 3\n2 2 9\n\n6 1\n1 -1 3\n0 -1 9\n0 1 7\n-1 0 1\n0 1 14\n-1 -1 11\n", "output": "2\n1\n1"}, {"type": "stdin_stdout", "input": "3\n\n5 0\n0 0 1\n-1 1 4\n1 0 2\n1 0 3\n2 2 11\n\n5 2\n0 0 0\n0 1 4\n3 0 2\n1 1 ... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.