messages listlengths 1 1 | ground_truth stringlengths 156 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\nGiven is a string S. Let T be the concatenation of K copies of S. We can repeatedly perform the following ope... | [{"input": "cooooooooonteeeeeeeedest\n1894324309", "output": "15154594472\n"}, {"input": "coonoooooonteeeeeeeedest\n1894324309", "output": "15154594472\n"}, {"input": "tsedeeeeeeeetnoooooonooc\n1894324309", "output": "15154594472\n"}, {"input": "cooooooooonteeeeeeeedest\n999993333", "output": "7999946664\n"}, {"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\nYou are given an array $a$ consisting of $n$ integers. You have to find the length of the smallest (shortest)... | [{"input": "5\n4\n1 2 3 4\n7\n4 8 3 16 4 10 2\n3\n0 1 1\n7\n1 3 1 4 5 3 2\n5\n5 3 3 2 5\n", "output": "0\n4\n0\n2\n3\n"}, {"input": "5\n4\n1 2 3 4\n7\n13 3 4 8 4 5 2\n3\n1 1 1\n7\n1 3 1 7 5 0 2\n5\n5 4 3 2 3\n", "output": "0\n4\n0\n5\n3\n"}, {"input": "5\n4\n1 2 3 4\n7\n4 8 3 16 4 5 2\n3\n0 1 1\n7\n1 3 1 4 5 3 2\n5\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\nThis is the hard version of the problem. The difference between the versions is that the easy version has no ... | [{"input": "5\n2 0\n1 2\n2 1\n1 2\n1 2\n2 1\n2 1\n1 2\n3 9\n1 2 3\n1 2\n1 3\n2 3\n1 2\n1 3\n2 3\n1 2\n1 3\n2 3\n3 0\n3 2 1\n", "output": "2\n2\n2\n2\n2\n3\n4\n4\n3\n3\n3\n3\n4\n4\n3\n3\n"}, {"input": "5\n2 0\n1 2\n2 1\n1 2\n1 2\n2 1\n2 1\n1 2\n3 9\n1 2 3\n1 2\n1 3\n2 3\n1 2\n1 3\n2 3\n1 2\n1 3\n2 3\n3 0\n3 2 1\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nG --Derangement / Derangement\n\nStory\n\nPerson D is doing research on permutations. At one point, D found a... | [{"input": "5\n4 0 0 10 12", "output": "0\n"}, {"input": "5\n4 1 0 10 12", "output": "0\n"}, {"input": "5\n4 1 0 10 19", "output": "0\n"}, {"input": "5\n4 1 0 10 38", "output": "0\n"}, {"input": "5\n4 1 0 10 11", "output": "0\n"}, {"input": "5\n4 0 0 10 6", "output": "0\n"}, {"input": "5\n4 0 0 10 3", "output": "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\nSnuke received a triangle as a birthday present. The coordinates of the three vertices were (x_1, y_1), (x_2,... | [{"input": "-1 -1\n1 1\n2 0", "output": "0.402627528107\n"}, {"input": "3 -1\n2 5\n1 16", "output": "0.143556168892\n"}, {"input": "-3 1\n1 1\n2 -1", "output": "0.548232156368\n"}, {"input": "6 -2\n2 5\n1 18", "output": "0.976523677728\n"}, {"input": "0 -1\n1 1\n2 -1", "output": "0.398016099934\n"}, {"input": "-1 -1\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\nFind the number, modulo 998244353, of sequences of length N consisting of 0, 1 and 2 such that none of their ... | [{"input": "102 205", "output": "214138673\n"}, {"input": "169 205", "output": "909969555\n"}, {"input": "613 159", "output": "832714847\n"}, {"input": "325 205", "output": "688557253\n"}, {"input": "613 201", "output": "958022812\n"}, {"input": "325 289", "output": "665901367\n"}, {"input": "613 216", "output": "57367... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOnce little Vasya read an article in a magazine on how to make beautiful handmade garland from colored paper.... | [{"input": "hvewdvwdwudrwarwmddwnazmwauzatrmwptwwevavpmwrtruwnpwantewrnwmepdwvtmnveanunrvrtwpvhhnuhnmpptdttzmmndtvudmzhhannmmnahdpzamuvhzaavnhtnumwrwvttdetvuewaaennddwuvzvaptdzrzhtetwwzmzedrwuvrwznprhdvnavrruvvhzuwpdtmpwmzrwvermrhdamv\nuvzhwtpuputnahwwarduzddhpnwwvettprwavdmnztdnrddmarmvuevtdezndnezvarhmppwwnmvnrtddzhh... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn the pet store on sale there are:\n\n$a$ packs of dog food;\n\n$b$ packs of cat food;\n\n$c$ packs of unive... | [{"input": "7\n1 1 4 2 3\n0 0 0 0 0\n5 5 0 4 6\n1 1 1 1 1\n50000000 50000000 100000000 100000000 100000000\n0 0 0 100000000 100000000\n1 3 2 2 5\n", "output": "YES\nYES\nNO\nYES\nYES\nNO\nNO\n"}, {"input": "3\n0 0 0 0 0\n2 1 0 2 2\n60 600 609 700 500\n", "output": "YES\nNO\nNO\n"}, {"input": "1\n114514 114514 114514 11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are $n$ distinct points on a coordinate line, the coordinate of $i$-th point equals to $x_i$. Choose a ... | [{"input": "3\n0 -536870912 536870912\n", "output": "3\n-536870912 0 536870912 \n"}, {"input": "3\n0 -536870912 536870912\n", "output": "3\n-536870912 0 536870912\n"}, {"input": "3\n-1 -536870912 536870912\n", "output": "2\n-536870912 536870912 \n"}, {"input": "2\n536870912 -536870912\n", "output": "2\n-536870912 53687... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nEhab is interested in the bitwise-xor operation and the special graphs. Mahmoud gave him a problem that combi... | [{"input": "1000000000000\n", "output": "20140978692096\n"}, {"input": "1000100000000\n", "output": "20142429742080\n"}, {"input": "1000100000010\n", "output": "20142429742357\n"}, {"input": "1001100000010\n", "output": "20161739809813\n"}, {"input": "1000000000000\n", "output": "20140978692096"}, {"input": "9999999999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDo you like summer? Residents of Berland do. They especially love eating ice cream in the hot summer. So this... | [{"input": "10\n536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132\n", "output": "536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 "}, {"input": "10\n876584065 876584063 876584061 876584059 876584057 876584055 876584053 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an integer array $a_1, a_2, \\dots, a_n$ and integer $k$.\n\nIn one step you can\n\neither choo... | [{"input": "1\n98 282\n103 948 349 26 241 933 394 546 476 785 441 397 658 308 801 940 760 29 717 343 99 530 389 797 955 322 662 763 654 781 1814 185 622 960 363 84 375 998 331 572 236 837 604 874 376 362 649 482 860 718 54 298 574 1726 16 943 71 292 615 829 460 301 358 245 585 438 24 561 252 416 88 81 86 571 805 67 862... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nEstimating the Flood Risk\n\nMr. Boat is the owner of a vast extent of land. As many typhoons have struck Jap... | [{"input": "20 5 2\n3 1 0\n6 2 -1", "output": "-781\n"}, {"input": "16 5 2\n2 2 3\n1 2 3", "output": "-397\n"}, {"input": "10 5 2\n1 1 10\n5 2 6", "output": "199\n"}, {"input": "16 5 2\n2 2 3\n1 2 4", "output": "-392\n"}, {"input": "12 5 2\n8 2 10\n1 5 3", "output": "331\n"}, {"input": "5 5 2\n1 1 10\n5 4 3", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Write Number in Expanded Form - Part 2\n\nThis is version 2 of my ['Write Number in Exanded Form' Kata](htt... | [{"input": "693.230459", "output": "[\"600 + 90 + 3 + 2/10 + 3/100 + 4/10000 + 5/100000 + 9/1000000\"]", "fn_name": "expanded_form"}, {"input": "7.3004", "output": "[\"7 + 3/10 + 4/10000\"]", "fn_name": "expanded_form"}, {"input": "7.304", "output": "[\"7 + 3/10 + 4/1000\"]", "fn_name": "expanded_form"}, {"input": "1.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\nAn X-layered kagami mochi (X ≥ 1) is a pile of X round mochi (rice cake) stacked vertically where each mochi ... | [{"input": "7\n50\n30\n50\n100\n50\n80\n30\n", "output": "4\n"}, {"input": "7\n50\n30\n50\n100\n50\n80\n35", "output": "5\n"}, {"input": "7\n50\n40\n91\n110\n50\n34\n59", "output": "6\n"}, {"input": "7\n50\n30\n50\n100\n50\n80\n59", "output": "5\n"}, {"input": "7\n50\n40\n50\n100\n50\n80\n59", "output": "5\n"}, {"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\nFor integers b (b \\geq 2) and n (n \\geq 1), let the function f(b,n) be defined as follows:\n\n* f(b,n) = n,... | [{"input": "31415926535\n13", "output": "15707963262\n"}, {"input": "31415926535\n2", "output": "31415926534\n"}, {"input": "31415926535\n4", "output": "31415926532\n"}, {"input": "31415926535\n3", "output": "15707963267\n"}, {"input": "31415926535\n6", "output": "31415926530\n"}, {"input": "31415926535\n5", "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\nLet's define the permutation of length n as an array p = [p1, p2, ..., pn] consisting of n distinct integers ... | [{"input": "50 20365011074\n", "output": "2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19 22 21 24 23 26 25 28 27 30 29 32 31 34 33 36 35 38 37 40 39 42 41 44 43 46 45 48 47 50 49 "}, {"input": "50 5608642004\n", "output": "1 2 4 3 5 6 8 7 9 10 11 13 12 15 14 17 16 18 20 19 22 21 23 24 25 26 28 27 30 29 31 32 33 34 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe aim of the kata is to try to show how difficult it can be to calculate decimals of an irrational number w... | [{"input": "1e-06", "output": "[[1000001, 3.1415936536]]", "fn_name": "iter_pi"}, {"input": "0.0001", "output": "[[10000, 3.1414926536]]", "fn_name": "iter_pi"}, {"input": "1e-05", "output": "[[100001, 3.1416026535]]", "fn_name": "iter_pi"}, {"input": "0.001", "output": "[[1000, 3.1405926538]]", "fn_name": "iter_pi"}, ... | 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\nGiven a set of integers (it can contain equal elements).\n\nYou have to split it into two subsets $A$ and $B$... | [{"input": "1\n100\n0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99\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\nDescription\n\nIn 200X, the mysterious circle K, which operates at K University, announced K Poker, a new gam... | [{"input": "3\n0 1 0 1 0 0 0 -1 0 1 0 -1 0\n1 0 0 0 0 0 1 0 0 0 0 0 2\n0 1 1 0 1 1 1 0 1 0 0 5 5\n3 1 1 1 0 1 0 0 1 0 3 -1 1\n1 1 2 7 5 10 20 50 100\n7H 6H 2H 5H 3H\n9S 9C 9H 8H 8D\nKS KH QH JD TS\n10\n1 1 1 1 1 1 1 1 1 0 1 1 1\n0 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 2 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 1 1 1 1 1\n1 2 3 4 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\nOne day, $n$ people ($n$ is an even number) met on a plaza and made two round dances, each round dance consis... | [{"input": "20\n", "output": "12164510040883200\n"}, {"input": "20\n", "output": "12164510040883200\n"}, {"input": "18\n", "output": "39520825344000\n"}, {"input": "18\n", "output": "39520825344000\n"}, {"input": "16\n", "output": "163459296000\n"}, {"input": "16\n", "output": "163459296000\n"}, {"input": "14\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\nTakahashi has N balls. Initially, an integer A_i is written on the i-th ball.\n\nHe would like to rewrite the... | [{"input": "10 3\n5 1 3 2 4 1 2 2 3 4", "output": "3\n"}, {"input": "10 3\n5 1 3 4 8 1 2 2 3 4", "output": "4\n"}, {"input": "10 3\n3 2 3 4 8 1 2 2 3 4", "output": "2\n"}, {"input": "10 1\n5 1 3 2 4 1 2 2 3 8", "output": "7\n"}, {"input": "10 1\n5 2 3 2 4 1 2 2 3 8", "output": "6\n"}, {"input": "10 3\n5 1 3 4 4 1 2 2 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\nSummer is coming! It's time for Iahub and Iahubina to work out, as they both want to look hot at the beach. T... | [{"input": "4 5\n22972 40786 3691 85313 46694\n33077 16067 3134 97367 68508\n4250 35501 17327 14435 32518\n64673 65438 56977 123599 27280\n", "output": "753143\n"}, {"input": "4 5\n22972 40786 3691 85313 46694\n33077 16067 3134 97367 129038\n4250 35501 17327 14435 32518\n64673 65438 56977 123599 3213\n", "output": "789... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRng is baking cookies.\n\nInitially, he can bake one cookie per second.\n\nHe can also eat the cookies baked ... | [{"input": "1000000000000 1000000100000", "output": "1000000000000\n"}, {"input": "1000010000000 1000100100001", "output": "1000010000000\n"}, {"input": "1000110000000 1000100100001", "output": "1000102100111\n"}, {"input": "1000100000000 1000100100001", "output": "1000100000000\n"}, {"input": "1000101000000 1000110100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a positive integer $n$.\n\nLet $S(x)$ be sum of digits in base 10 representation of $x$, for ex... | [{"input": "1000000000000\n", "output": "109\n"}, {"input": "1000000000000\n", "output": "109\n"}, {"input": "999999999992\n", "output": "200\n"}, {"input": "290687942106\n", "output": "153\n"}, {"input": "324278748889\n", "output": "160\n"}, {"input": "110884501982\n", "output": "146\n"}, {"input": "999999999999\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\nYou are given an array of positive integers a_1, a_2, ..., a_{n} × T of length n × T. We know that for any i ... | [{"input": "100 10000000\n300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 30... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDivisors of 42 are : 1, 2, 3, 6, 7, 14, 21, 42.\nThese divisors squared are: 1, 4, 9, 36, 49, 196, 441, 1764.... | [{"input": "5000\n10000", "output": "[[[6237, 45024100], [9799, 96079204], [9855, 113635600]]]", "fn_name": "list_squared"}, {"input": "600\n1500", "output": "[[[728, 722500], [1434, 2856100]]]", "fn_name": "list_squared"}, {"input": "1\n250", "output": "[[[1, 1], [42, 2500], [246, 84100]]]", "fn_name": "list_squared"}... | 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\nFangy collects cookies. Once he decided to take a box and put cookies into it in some way. If we take a squar... | [{"input": "1000\n", "output": "691074\n"}, {"input": "696\n", "output": "695035\n"}, {"input": "928\n", "output": "794863\n"}, {"input": "589\n", "output": "889192\n"}, {"input": "657\n", "output": "874011\n"}, {"input": "617\n", "output": "247876\n"}, {"input": "298\n", "output": "999535\n"}, {"input": "823\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\nYou are given a program you want to execute as a set of tasks organized in a dependency graph. The dependency... | [{"input": "10 39\n0 1 0 1 0 1 1 0 1 1\n0 1\n0 2\n0 3\n0 4\n0 5\n0 6\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n3 4\n3 6\n3 7\n3 8\n3 9\n4 5\n4 6\n4 7\n4 9\n5 6\n5 7\n5 8\n5 9\n6 8\n6 9\n7 8\n7 9\n8 9\n", "output": "4\n"}, {"input": "10 39\n1 1 1 1 1 1 1 1 1 1\n0 1\n0 2\n0 3\n0 5\n0 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\nGiven a positive integer n, find k integers (not necessary distinct) such that all these integers are strictl... | [{"input": "100000 10\n", "output": "2 2 2 2 2 5 5 5 5 5\n"}, {"input": "2048 11\n", "output": "2 2 2 2 2 2 2 2 2 2 2\n"}, {"input": "1024 10\n", "output": "2 2 2 2 2 2 2 2 2 2\n"}, {"input": "100000 8\n", "output": "2 2 2 2 2 5 5 125 "}, {"input": "1024 9\n", "output": "2 2 2 2 2 2 2 2 4 "}, {"input": "99999 4\n", "ou... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nEmail address in Berland is a string of the form A@B, where A and B are arbitrary strings consisting of small... | [{"input": "c@ir@xf@ap@fk@sp@wm@ec@qw@vg@by@iu@tr@wu@pv@lj@dd@tc@qj@ok@hm@bs@ul@ez@cg@ht@xf@ag@tr@hz@ap@tx@ly@dg@hu@nd@uv@il@ii@cn@nc@nb@cy@kp@dk@xa@da@ta@yr@yv@qg@db@je@wz@rn@yh@xi@mj@kc@uj@yu@cf@ps@ao@fo@le@d\n", "output": "c@i,r@x,f@a,p@f,k@s,p@w,m@e,c@q,w@v,g@b,y@i,u@t,r@w,u@p,v@l,j@d,d@t,c@q,j@o,k@h,m@b,s@u,l@e,z@... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn 2013, the writers of Berland State University should prepare problems for n Olympiads. We will assume that... | [{"input": "40\n10 23 54 73\n11 10 58 84\n11 9 65 84\n11 20 45 92\n11 11 35 96\n11 6 66 16\n11 12 1 13\n11 15 8 18\n11 18 72 86\n10 24 62 38\n10 27 79 12\n11 11 24 59\n11 14 6 99\n11 6 33 100\n11 10 37 60\n11 10 67 8\n11 6 73 25\n11 8 91 3\n10 28 45 32\n11 14 64 37\n11 21 15 79\n10 29 79 53\n11 13 29 29\n10 23 76 76\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\nRead problems statements in Russian here \nThe Head Chef is studying the motivation and satisfaction level of... | [{"input": "1\n6 1\n0 12 11\n7 5 10\n7", "output": "19\n"}, {"input": "1\n6 1\n0 10 11\n7 5 10\n7", "output": "18\n"}, {"input": "1\n10 1\n1 5 -1\n6 -1 2\n1", "output": "-2\n"}, {"input": "1\n10 1\n1 5 -2\n6 -1 2\n1", "output": "-3\n"}, {"input": "1\n1 1\n-2 5 12\n-3 1 2\n0", "output": "14\n"}, {"input": "1\n10 1\n1 4 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFor each positive integer n consider the integer ψ(n) which is obtained from n by replacing every digit a in ... | [{"input": "1000000000 1000000000\n", "output": "8999999999000000000\n"}, {"input": "999999999 1000000000\n", "output": "8999999999000000000\n"}, {"input": "733403773 763985558\n", "output": "195522678015960698\n"}, {"input": "862630595 866814866\n", "output": "118499050707315380\n"}, {"input": "609160934 909699101\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\nThe game of billiards involves two players knocking 3 balls around\non a green baize table. Well, there is mo... | [{"input": "5\n140 82\n141 134\n90 110\n339 106\n88 90", "output": "1 278\n"}, {"input": "5\n140 82\n176 134\n90 110\n289 106\n88 90", "output": "1 263\n"}, {"input": "5\n140 147\n141 71\n172 110\n339 30\n40 90", "output": "1 434\n"}, {"input": "5\n140 82\n89 134\n90 110\n289 106\n88 90", "output": "1 176\n"}, {"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\nAka Beko, trying to escape from 40 bandits, got lost in the city of A. Aka Beko wants to go to City B, where ... | [{"input": "0100\n0101\n10100\n10000\n0101011\n1011\n011111\n#", "output": "Yes\nNo\nYes\nNo\nYes\nYes\nYes\n"}, {"input": "0100\n0100\n10100\n10000\n0101011\n1001\n011111\n#", "output": "Yes\nYes\nYes\nNo\nYes\nNo\nYes\n"}, {"input": "0100\n0100\n10100\n10000\n0101011\n1011\n011110\n#", "output": "Yes\nYes\nYes\nNo\nY... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA positive integer may be expressed as a sum of different prime numbers (primes), in one way or another. Give... | [{"input": "24 3\n24 2\n2 1\n1 1\n4 2\n18 3\n17 1\n17 3\n17 4\n110 5\n1000 10\n1120 14\n0 0", "output": "2\n3\n1\n0\n0\n2\n1\n0\n1\n79\n200102899\n2079324314\n"}, {"input": "24 3\n24 2\n2 1\n1 1\n4 2\n33 3\n17 1\n17 3\n17 4\n100 5\n1000 10\n1120 14\n0 0", "output": "2\n3\n1\n0\n0\n4\n1\n0\n1\n55\n200102899\n2079324314\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYour aged grandfather is tragically optimistic about Team GB's chances in the upcoming World Cup, and has enl... | [{"input": "109.1", "output": "[\"X-----------------------------------------------------XX-----------------------------------------------------X\\n-X----------------------------------------------------XX----------------------------------------------------X-\\n--X---------------------------------------------------XX----... | 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\nYou are given circle $A$ with radius $r_a$ and with central coordinate $(x_a, y_a)$ and circle $B$ with radiu... | [{"input": "2\n1.3018830993798196 1.1804991696233216 6.678597997840617 2.1321559253491804 2.072303142011048 4.898405435743801\n1.6154186783950772 0.39921226227011497 2.512872370263131 5.273208013897418 2.169775861927481 3.924014997809771", "output": "2\n1\n"}, {"input": "2\n1.3018830993798196 1.1804991696233216 6.67859... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nUser ainta has a stack of n red and blue balls. He can apply a certain operation which changes the colors of ... | [{"input": "50\nBRRRBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n", "output": "1125899906842609\n"}, {"input": "50\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n", "output": "1125899906842623\n"}, {"input": "50\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n", "output": "1125899906842623\n"}, {"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\nA trick of fate caused Hatsumi and Taku to come to know each other. To keep the encounter in memory, they dec... | [{"input": "1505 13 9\n2619 11 3", "output": "1114\n"}, {"input": "2137 -1 28\n1419 -2 1", "output": "719\n"}, {"input": "2137 -1 28\n1818 -1 1", "output": "320\n"}, {"input": "2137 -1 28\n3039 -1 1", "output": "902\n"}, {"input": "167 -1 28\n3039 -1 0", "output": "2872\n"}, {"input": "167 -2 19\n3039 -1 0", "output": ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nBetter things, cheaper. There is a fierce battle at the time sale held in some supermarkets today. \"LL-do\" ... | [{"input": "6 5\n1 1 . 0 0 4\n1 . . . . .\n. . 2 2 . .\n. . 2 2 3 3\nP . - . . .\n5\n0 50 5 10\n1 20 0 10\n2 10 5 15\n3 150 3 10\n4 100 8 9\n0 0", "output": "330\n"}, {"input": "6 5\n1 0 . 0 0 4\n1 . . . . .\n. . 2 2 . .\n. . 2 2 3 3\nP . . . . .\n5\n0 50 8 10\n1 20 0 10\n2 10 5 15\n3 150 3 5\n4 100 8 27\n0 0", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere is a grid, consisting of n rows and m columns. Each cell of the grid is either free or blocked. One of ... | [{"input": "1\n3 31\n############################..#\n.............................L.\n############################..#\n", "output": "############################++#\n+++++++++++++++++++++++++++++L+\n############################++#\n"}, {"input": "1\n3 31\n#############################..\n.............................L... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given several queries. Each query consists of three integers p, q and b. You need to answer whether t... | [{"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\nFinite\nInfinite\nInfinite... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nVasya studies positional numeral systems. Unfortunately, he often forgets to write the base of notation in wh... | [{"input": "1000 1000\n", "output": "5\n"}, {"input": "1000 539\n", "output": "4\n"}, {"input": "999 1000\n", "output": "4\n"}, {"input": "1000 999\n", "output": "4\n"}, {"input": "998 1000\n", "output": "4\n"}, {"input": "1000 998\n", "output": "4\n"}, {"input": "247 1000\n", "output": "4\n"}, {"input": "208 997\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\nThere are N piles of candies on the table. The piles are numbered 1 through N. At first, pile i contains a_i ... | [{"input": "3\n-1 -1 1", "output": "Second\n"}, {"input": "3\n2 -1 4", "output": "Second\n"}, {"input": "3\n-1 -2 4", "output": "First\n"}, {"input": "3\n0 -1 1", "output": "Second\n"}, {"input": "3\n-1 0 1", "output": "Second\n"}, {"input": "3\n1 -1 0", "output": "Second\n"}, {"input": "3\n-2 -2 4", "output": "First\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\nChef has an array of N integers. He wants to play a special game. In this game he needs to make all the integ... | [{"input": "3\n-10 -1 -2\n2", "output": "12\n"}, {"input": "3\n-10 -1 -4\n2", "output": "14\n"}, {"input": "3\n-6 -3 -2\n3", "output": "11\n"}, {"input": "3\n-8 -3 -2\n3", "output": "13\n"}, {"input": "3\n1 -2 -10\n1", "output": "10\n"}, {"input": "3\n-15 0 -1\n9", "output": "16\n"}, {"input": "3\n-24 0 -1\n9", "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\nTwo strings ```a``` and b are called isomorphic if there is a one to one mapping possible for every character... | [{"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\nThere are n seats in the train's car and there is exactly one passenger occupying every seat. The seats are n... | [{"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 965 177 479 63 498 484 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\nMishka is trying really hard to avoid being kicked out of the university. In particular, he was doing absolut... | [{"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 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\nAlice and Bob are playing a fun game of tree tag.\n\nThe game is played on a tree of n vertices numbered from... | [{"input": "10\n10 9 10 6 6\n6 1\n7 6\n4 2\n4 10\n5 1\n9 5\n6 8\n3 4\n4 5\n2 1 2 1 1\n2 1\n9 7 4 2 3\n5 1\n2 4\n4 8\n8 6\n8 9\n7 8\n1 8\n1 3\n11 2 11 6 8\n1 10\n6 11\n8 2\n11 3\n1 7\n11 4\n5 8\n11 7\n1 9\n1 8\n5 3 2 1 2\n3 1\n2 1\n4 5\n1 5\n2 1 2 1 1\n2 1\n2 2 1 1 1\n2 1\n2 2 1 1 1\n1 2\n2 2 1 1 1\n2 1\n5 4 5 4 2\n2 1\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDuring their New Year holidays, Alice and Bob play the following game using an array $a$ of $n$ integers:\n\n... | [{"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"}, {"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"}, {"input": "4\n4\n5 2 10 3\n3\n6 2 0\n4\n2 2 2 0\n2\n10 11\n", "output": "Alice\nAlice\nAlice\nTie\n"}, {"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\nproblem\n\nAOR Ika wants to create a strong password that consists only of lowercase letters. AOR Ika-chan, w... | [{"input": "5\npassword\nlogin\nnimda\nroot\nmaster", "output": "b\n"}, {"input": "5\nbraprswp\nlofho\nojdma\nsnnt\nfuarsm", "output": "c\n"}, {"input": "5\nbraprsxp\noofhk\nojcma\nsnnt\nfuarsm", "output": "d\n"}, {"input": "5\napssword\nlogin\nnimda\nroot\nmaster", "output": "b\n"}, {"input": "5\nopssward\nlogin\nnimd... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA factory produces thimbles in bulk. Typically, it can produce up to a thimbles a day. However, some of the m... | [{"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"}, {"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"}, {"input": "5 2 2 1 8\n1 1 2\n1 5 3\n1 2 1\n2 2\n1 4 2\n1 3 2\n2 1\n2 2\n", "output": "3\n6\n5\n"}, {"input": "5 4 2 1 8\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\nLet's play the game using a bag containing several cards with integers written on it. In each game, participa... | [{"input": "5\n1 10\n10 3\n10 4\n25 2\n50 2\n4\n120\n500\n100\n168\n7\n1 10\n3 10\n5 10\n10 10\n25 10\n50 10\n100 10\n3\n452\n574\n787\n0", "output": "20\n0\n20\n10\n9789\n13658\n17466\n"}, {"input": "5\n1 10\n5 3\n10 3\n25 2\n50 2\n4\n120\n500\n100\n168\n7\n1 10\n3 10\n5 10\n10 10\n25 10\n10 10\n100 10\n3\n452\n574\n7... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThree friends are going to meet each other. Initially, the first friend stays at the position $x = a$, the se... | [{"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"}, {"input": "8\n4 6 16\n7 6 35\n12 5 1\n2 15 3\n1 1000000000 0000000000\n1 1000000000 459694946\n1 0 9\n0 2 6\n", "output": "20\n54\n18\n22\n199999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe only difference between easy and hard versions is constraints.\n\nThe BerTV channel every day broadcasts ... | [{"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"}, {"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", "output": "2\n1\n4\n4\n"}, {"input": "4\n5 2 4\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLet us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem state... | [{"input": "10\nW22kb1L1 0 39 0 465 0 1961 865\n1MCXiVYmu5ys0afl 0 38 0 0 0 1982 1241\nCxg706kUJtQ 0 23 211 0 0 1785 1056\nmzEY 0 16 0 0 0 1988 1404\nv8JUjmam5SFP 0 48 0 788 1199 1426 0\n7giq 0 21 0 780 1437 1363 1930\nsXsUGbAulj6Lbiq 0 32 205 0 0 603 0\nRepIrY1Er4PgK 0 13 381 872 927 1488 0\nleKBdKHLnLFz 0 29 220 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\n# Scenario \n\n*Now that the competition gets tough it will* **_Sort out the men from the boys_** . \n\n**_Me... | [{"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\nVasya used to be an accountant before the war began and he is one of the few who knows how to operate a compu... | [{"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 pair pair pair int int int ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPolycarpus adores TV series. Right now he is ready to finish watching a season of a popular sitcom \"Graph Th... | [{"input": "10\n3 8 10 1 7 9 6 5 2\n", "output": " 4"}, {"input": "5\n5 2 4 3\n", "output": " 1"}, {"input": "5\n5 4 3 2\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\nFamous Brazil city Rio de Janeiro holds a tennis tournament and Ostap Bender doesn't want to miss this event.... | [{"input": "1000000000000000000\n", "output": "85\n"}, {"input": "1000000000001000000\n", "output": "85\n"}, {"input": "1008361188500224528\n", "output": "85\n"}, {"input": "1000000000001001000\n", "output": "85\n"}, {"input": "679891637638612258\n", "output": "85\n"}, {"input": "123456789123456789\n", "output": "81\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\nDid you know that there are over 40,000 varieties of Rice in the world ? There are so many dishes that can be... | [{"input": "3\n4\ntilak +\ntilak +\ntilak -\ntilaj +\n3\nratna +\nshashi -\nratna -\n3\nbhavani -\nbhavani +\nbhavani -", "output": "0\n-2\n-1\n"}, {"input": "3\n4\ntilak +\nkalit +\ntilak -\ntilak +\n3\nratna +\nshashi -\nratna -\n3\nbhavani -\nbhavani +\nbhavani -", "output": "2\n-2\n-1\n"}, {"input": "3\n4\nuilak +\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAmicable numbers are two different numbers so related that the sum of the proper divisors of each is equal to... | [{"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\nOne day Vasya decided to have a look at the results of Berland 1910 Football Championship’s finals. Unfortuna... | [{"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\nVOCI\nVOCI\nH\nH\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\nYour friend has invited you to a party, and tells you to meet them in the line to get in. The one problem is ... | [{"input": "[\"blue\", \"green\", \"red\", \"green\", \"blue\", \"blue\", \"red\"]", "output": "[1]", "fn_name": "friend_find"}, {"input": "[\"blue\", \"blue\", \"blue\", \"blue\", \"blue\", \"blue\", \"blue\"]", "output": "[0]", "fn_name": "friend_find"}, {"input": "[\"blue\", \"red\", \"blue\", \"blue\", \"red\", \"b... | 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\nMonocarp wrote down two numbers on a whiteboard. Both numbers follow a specific format: a positive integer $x... | [{"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 8\n1000000 4\n10 9\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\nThere are N points on the 2D plane, i-th of which is located on (x_i, y_i).\nThere can be multiple points tha... | [{"input": "3\n-2 -2\n2 -1\n-29 1", "output": "33\n"}, {"input": "3\n-1 -4\n1 -1\n-23 4", "output": "30\n"}, {"input": "3\n-1 -4\n1 -1\n-23 0", "output": "26\n"}, {"input": "3\n-2 -2\n-2 0\n11 3", "output": "18\n"}, {"input": "3\n-2 -2\n-2 0\n16 3", "output": "23\n"}, {"input": "3\n-3 -1\n0 6\n14 0", "output": "20\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\nTwilight Sparkle once got a crystal from the Crystal Mine. A crystal of size n (n is odd; n > 1) is an n × n ... | [{"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\nTake an input string and return a string that is made up of the number of occurences of each english letter i... | [{"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\nSagheer is walking in the street when he comes to an intersection of two roads. Each road can be represented ... | [{"input": "1 0 0 1\n0 0 0 0\n0 0 -1 0\n0 -1 0 0\n", "output": "YES\n"}, {"input": "0 1 0 0\n0 0 0 -1\n0 0 0 1\n0 0 0 0\n", "output": "YES\n"}, {"input": "1 1 0 1\n0 -1 0 0\n0 0 0 0\n0 0 0 0\n", "output": "YES\n"}, {"input": "0 0 0 0\n0 0 1 1\n0 0 0 0\n-1 0 0 0\n", "output": "YES\n"}, {"input": "0 0 0 0\n0 0 0 1\n0 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\nMobile Display Keystrokes\n\nDo you remember the old mobile display keyboards? Do you also remember how incon... | [{"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\nA prime number n (11, 19, 23, etc.) that divides by 4 and has 3 has an interesting property. The results of c... | [{"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\n86\n86\n84\n86\n86\n84\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\nAt a geometry lesson Bob learnt that a triangle is called right-angled if it is nondegenerate and one of its ... | [{"input": "-100 -100 100 100 -100 100\n", "output": "RIGHT\n"}, {"input": "-100 -100 100 -100 0 73\n", "output": "NEITHER\n"}, {"input": "-45 -87 -34 -79 -60 -62\n", "output": "NEITHER\n"}, {"input": "-45 -87 -44 -79 -60 -62\n", "output": "NEITHER\n"}, {"input": "-50 -37 -93 -12 -30 -80\n", "output": "NEITHER\n"}, {"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\nAquaMoon and Cirno are playing an interesting game with arrays. Cirno has prepared two arrays $a$ and $b$, bo... | [{"input": "4\n25\n0 0 0 0 0 8 1 0 9 0 8 8 0 0 11 0 0 0 9 3 10 4 10 4 0\n2 0 0 1 10 0 10 6 0 4 0 2 0 3 11 1 2 11 0 7 6 0 0 9 0\n25\n0 0 6 0 6 2 0 0 4 1 0 0 8 1 0 9 6 6 7 0 5 4 3 0 6\n8 0 0 2 0 9 0 6 5 0 4 9 9 0 0 3 0 6 0 6 7 0 0 0 0\n25\n4 0 7 0 5 0 0 0 0 0 5 2 1 5 5 9 7 0 0 0 0 0 0 2 1\n5 0 0 1 7 1 0 0 5 1 2 0 0 0 3 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\nTanya has $n$ candies numbered from $1$ to $n$. The $i$-th candy has the weight $a_i$.\n\nShe plans to eat ex... | [{"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"}, {"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... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDescription overhauled by V\n\n---\n\nI've invited some kids for my son's birthday, during which I will give ... | [{"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\nIlya lives in a beautiful city of Chordalsk.\n\nThere are $n$ houses on the street Ilya lives, they are numer... | [{"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"}, {"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"}, {"input": "41\n1 2 3 4 5 6 7 8 9 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\nThe bear has a string s = s_1s_2... s_{|}s| (record |s| is the string's length), consisting of lowercase Engl... | [{"input": "pbearjbearbebearnbabcffbearbearwubearjezpiorrbearbearjbdlbearbearqbearjbearwipmsbearoaftrsebearzsnqb\n", "output": "4419\n"}, {"input": "pbearjbearbebearnbabcffbearbearwubearjezpiorrbearbearjbdlbearbearqbearjbearwipmsbearoaftrsebearzsnqb\n", "output": "4419\n"}, {"input": "pbearjbearbebfarnbabcffbearbearwub... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn 2937, DISCO creates a new universe called DISCOSMOS to celebrate its 1000-th anniversary.\n\nDISCOSMOS can... | [{"input": "1486 120 1001", "output": "960152848\n"}, {"input": "328 102 1011", "output": "261361566\n"}, {"input": "328 102 1111", "output": "647647330\n"}, {"input": "328 117 1011", "output": "407646568\n"}, {"input": "117 102 1111", "output": "841656819\n"}, {"input": "141 120 1001", "output": "236970719\n"}, {"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\nKamil likes streaming the competitive programming videos. His MeTube channel has recently reached 100 million... | [{"input": "32\n402528994560 0 0 0 0 0 0 932646223872 893192888700 0 813583026900 0 0 0 0 143521875000 0 177570054144 186624000000 0 517655600000 202145625000 341007975000 0 116252718750 0 148561875000 0 304819200000 248474688000 0 103125000000\n29 25\n20 24\n8 21\n23 3\n32 14\n29 30\n31 24\n28 12\n7 10\n18 1\n11 7\n29... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPasha got a very beautiful string s for his birthday, the string consists of lowercase Latin letters. The let... | [{"input": "xwcxggxvfqbdklewbxkjzibmufnaywuxsqvwakefxbbkfandvigasbhbatsxyqxicrosatfsfybedklsaztyyiuurfbrzmwumujy\n100\n14 43 30 13 8 19 33 7 16 14 15 35 5 18 44 1 35 1 18 7 50 47 9 49 28 29 39 37 27 17 19 12 5 24 37 42 37 23 35 31 10 26 5 38 40 34 42 47 2 40 43 32 16 25 14 45 35 38 46 48 49 27 49 38 10 49 5 7 3 3 41 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\nFizzBuzz is a game in which integers of 1 or more are spoken in order according to the following rules.\n\n* ... | [{"input": "10010000000", "output": "990079BuzzFizz141999\n"}, {"input": "10010000001", "output": "90079BuzzFizz1419990\n"}, {"input": "10000000001", "output": "3FizzBuzz1418650796F\n"}, {"input": "10000001001", "output": "418650928FizzBuzz141\n"}, {"input": "10000000010", "output": "1418650796Fizz141865\n"}, {"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\nSometimes some words like \"localization\" or \"internationalization\" are so long that writing them many tim... | [{"input": "20\nlkpmx\nkovxmxorlgwaomlswjxlpnbvltfv\nhykasjxqyjrmybejnmeumzha\ntuevlumpqbbhbww\nqgqsphvrmupxxc\ntrissbaf\nqfgrlinkzvzqdryckaizutd\nzzqtoaxkvwoscyx\noswytrlnhpjvvnwookx\nlpuzqgec\ngyzqfwxggtvpjhzmzmdw\nrlxjgmvdftvrmvbdwudra\nvsntnjpepnvdaxiporggmglhagv\nxlvcqkqgcrbgtgglj\nlyxwxbiszyhlsrgzeedzprbmcpduvq\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\nIahub and Sorin are the best competitive programmers in their town. However, they can't both qualify to an im... | [{"input": "100\n-57 -64 83 76 80 27 60 76 -80 -56 52 72 -17 92 -96 87 41 -88 94 89 12 42 36 34 -100 -43 -42 62 3 87 -69 -6 -27 -59 -7 5 -90 -23 63 -87 -60 -92 -40 54 -16 -47 67 -64 10 33 -19 53 -7 -62 16 -74 -36 4 -75 -55 92 3 -22 43 -30 48 -27 88 -58 41 36 8 -40 -30 -18 16 22 -66 -91 -46 48 -60 -45 -89 37 -76 52 81 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\nTaro had his own personal computer and set a password for login. However, Taro inadvertently forgot the passw... | [{"input": "KUSATSU\nLSATSU", "output": "No\n"}, {"input": "RUPCUAOC\n__PC", "output": "Yes\n"}, {"input": "KUSATSU\nLSATRU", "output": "No\n"}, {"input": "RUPCUAOC\n__OC", "output": "Yes\n"}, {"input": "KUSATSU\nLRATSU", "output": "No\n"}, {"input": "KUSATSU\nLRAUSU", "output": "No\n"}, {"input": "KTSATSU\nLRAUSU", "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\nThere is one card each with the numbers from \"1\" to \"10\", for a total of 10 cards. This card has numbers ... | [{"input": "1 2 3\n4 1 10\n5 1 10", "output": "YES\nYES\nYES\n"}, {"input": "1 2 3\n5 6 10\n4 9 10", "output": "YES\nYES\nYES\n"}, {"input": "1 2 3\n7 1 10\n5 1 10", "output": "YES\nYES\nYES\n"}, {"input": "1 4 3\n5 6 10\n4 9 10", "output": "YES\nYES\nYES\n"}, {"input": "1 2 3\n7 2 10\n5 1 10", "output": "YES\nYES\nYES... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe map of Bertown can be represented as a set of $n$ intersections, numbered from $1$ to $n$ and connected b... | [{"input": "20 50\n20 3\n5 16\n1 3\n10 11\n10 15\n15 9\n20 9\n14 6\n16 5\n13 4\n11 5\n3 20\n13 17\n11 8\n11 6\n12 14\n16 18\n17 13\n18 7\n3 1\n8 10\n17 15\n7 2\n9 13\n5 11\n6 1\n2 16\n8 18\n10 8\n4 13\n9 15\n14 12\n1 6\n9 20\n7 18\n6 14\n7 6\n18 16\n2 7\n3 11\n15 17\n3 12\n14 10\n4 14\n19 4\n11 10\n4 19\n8 12\n17 8\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\nFor a given array $a_1, a_2, a_3, ... , a_N$ of $N$ elements and $Q$ integers $x_i$ as queries, for each quer... | [{"input": "6 5\n1 2 3 2 7 6\n12 12 12 21 15", "output": "14\n14\n14\n21\n18\n"}, {"input": "6 5\n1 4 3 2 12 6\n10 1 22 25 23", "output": "11\n1\n18\n19\n19\n"}, {"input": "6 5\n1 4 3 2 12 1\n10 1 22 25 23", "output": "11\n2\n20\n21\n21\n"}, {"input": "6 5\n1 2 3 0 7 6\n6 17 16 21 29", "output": "11\n19\n19\n21\n21\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\nCurrently, XXOC's rap is a string consisting of zeroes, ones, and question marks. Unfortunately, haters gonna... | [{"input": "?00?0?0??00100?00?001111?11???1010110100?00?0?1?1?1001??001010?011???0000???????1111?1?101100110?001\n801448 0\n", "output": "819079856\n"}, {"input": "10001?0011?0??1?1001??001?001?0100??00???0???011?00111???1?1?0?0?0??1?1?1?1?1010?1101?0000?1??11?101\n0 1\n", "output": "680\n"}, {"input": "0101010??01???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\nPasha has many hamsters and he makes them work out. Today, n hamsters (n is even) came to work out. The hamst... | [{"input": "200\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n", "output": "100\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nDuring the quarantine, Sicromoft has more free time to create the new functions in \"Celex-2021\". The develo... | [{"input": "1\n118730819 699217111 1229905591 978426672\n", "output": "310250620284395093\n"}, {"input": "1\n118730819 699217111 995255402 1762535216\n", "output": "932024458581475216\n"}, {"input": "1\n118730819 699217111 1571293294 978426672\n", "output": "405569330969823476\n"}, {"input": "1\n159574671 699217111 157... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPeter has a sequence of integers a_1, a_2, ..., a_{n}. Peter wants all numbers in the sequence to equal h. He... | [{"input": "99 1999\n1999 1998 1997 1996 1995 1994 1993 1992 1991 1990 1989 1988 1987 1986 1985 1984 1983 1982 1981 1980 1979 1978 1977 1976 1975 1974 1973 1972 1971 1970 1969 1968 1967 1966 1965 1964 1963 1962 1961 1960 1959 1958 1957 1956 1955 1954 1953 1952 1951 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nHearing that energy drinks increase rating in those sites, Takahashi decides to buy up M cans of energy drink... | [{"input": "1 100000\n1000000000 100000\n", "output": "100000000000000\n"}, {"input": "1 100000\n1000000100 100000", "output": "100000010000000\n"}, {"input": "1 100000\n1000000110 100010", "output": "100000011000000\n"}, {"input": "1 100000\n1000000101 100000", "output": "100000010100000\n"}, {"input": "1 100000\n1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPetya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representat... | [{"input": "10\n4 8 480392999\n3 4 32525297\n9 7 417904789\n6 2 836294777\n5 3 616099185\n1 7 830574407\n8 10 838073755\n6 10 547050646\n2 1 12607780\n", "output": "0"}, {"input": "5\n1 2 1000000000\n2 3 747774\n3 4 4\n4 5 8447854\n", "output": " 36\n"}, {"in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPig is visiting a friend.\n\nPig's house is located at point 0, and his friend's house is located at point m ... | [{"input": "70 100\n0 99\n1 87\n1 94\n1 4\n2 72\n3 39\n3 69\n4 78\n5 85\n7 14\n8 59\n12 69\n14 15\n14 76\n17 17\n19 53\n19 57\n19 21\n21 35\n21 83\n24 52\n24 33\n27 66\n27 97\n30 62\n30 74\n30 64\n32 63\n35 49\n37 60\n40 99\n40 71\n41 83\n42 66\n42 46\n45 83\n51 76\n53 69\n54 82\n54 96\n54 88\n55 91\n56 88\n58 62\n62 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\nIn graph theory, a graph is a collection of nodes with connections between them.\nAny node can be connected t... | [{"input": "[[1], [0, 2, 3], [1], [1], [5], [4, 6, 7], [5], [5]]", "output": "[false]", "fn_name": "isTree"}, {"input": "[[1], [0, 2], [1, 3, 5], [2, 4], [3, 5], [4, 2]]", "output": "[false]", "fn_name": "isTree"}, {"input": "[[1, 2], [0, 3], [0, 3], [1, 2, 4], [3]]", "output": "[false]", "fn_name": "isTree"}, {"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\nThe weather is fine today and hence it's high time to climb the nearby pine and enjoy the landscape.\n\nThe p... | [{"input": "1000000000 1000100000\n", "output": "1000099999\n"}, {"input": "1000000000 1000101000\n", "output": "1000100999\n"}, {"input": "1013025570 1803009236\n", "output": "1803009227\n"}, {"input": "649229491 1684787431\n", "output": "1684787413\n"}, {"input": "171837140 1253572168\n", "output": "1253572147\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\nIvan had string s consisting of small English letters. However, his friend Julia decided to make fun of him a... | [{"input": "18\nabacab 2 329 401\nabadabacabae 1 293\nbacab 1 2\nabacabadabacabaga 1 433\nc 1 76\nbaca 1 26\ndab 1 72\nabagabaca 1 445\nabaea 1 397\ndabac 1 280\nab 2 201 309\nca 1 396\nabacabadab 1 497\nac 1 813\ncaba 1 444\nad 1 167\nbadab 1 358\naba 1 421\n", "output": "abacabaaaaaaaaaaaaaaaaaaabacaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nKolya is developing an economy simulator game. His most favourite part of the development process is in-game ... | [{"input": "1000000000\n", "output": "YES\n"}, {"input": "1000000000\n", "output": "YES"}, {"input": "999129999\n", "output": "YES\n"}, {"input": "917261049\n", "output": "YES\n"}, {"input": "803219200\n", "output": "YES\n"}, {"input": "908000000\n", "output": "YES\n"}, {"input": "999999987\n", "output": "YES\n"}, {"in... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.