CoolFace
Datasetpublic

TheRealSamuel/LeetCodeProblem

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes564downloads
1{2    "id": 3234,3    "name": "double_modular_exponentiation",4    "difficulty": "Medium",5    "link": "https://leetcode.com/problems/double-modular-exponentiation/",6    "date": "2023-12-03 00:00:00",7    "task_description": "You are given a **0-indexed** 2D array `variables` where `variables[i] = [ai, bi, ci, mi]`, and an integer `target`. An index `i` is **good** if the following formula holds: `0 <= i < variables.length` `((aibi % 10)ci) % mi == target` Return _an array consisting of **good** indices in **any order**_. **Example 1:** ``` **Input:** variables = [[2,3,3,10],[3,3,3,1],[6,1,1,4]], target = 2 **Output:** [0,2] **Explanation:** For each index i in the variables array: 1) For the index 0, variables[0] = [2,3,3,10], (23 % 10)3 % 10 = 2. 2) For the index 1, variables[1] = [3,3,3,1], (33 % 10)3 % 1 = 0. 3) For the index 2, variables[2] = [6,1,1,4], (61 % 10)1 % 4 = 2. Therefore we return [0,2] as the answer. ``` **Example 2:** ``` **Input:** variables = [[39,3,1000,1000]], target = 17 **Output:** [] **Explanation:** For each index i in the variables array: 1) For the index 0, variables[0] = [39,3,1000,1000], (393 % 10)1000 % 1000 = 1. Therefore we return [] as the answer. ``` **Constraints:** `1 <= variables.length <= 100` `variables[i] == [ai, bi, ci, mi]` `1 <= ai, bi, ci, mi <= 103` `0 <= target <= 103`",8    "public_test_cases": [9        {10            "label": "Example 1",11            "input": "variables = [[2,3,3,10],[3,3,3,1],[6,1,1,4]], target = 2",12            "output": "[0,2] "13        },14        {15            "label": "Example 2",16            "input": "variables = [[39,3,1000,1000]], target = 17",17            "output": "[] "18        }19    ],20    "private_test_cases": [21        {22            "input": [23                [24                    [25                        421,26                        377,27                        428,28                        16529                    ],30                    [31                        974,32                        742,33                        692,34                        35035                    ],36                    [37                        826,38                        560,39                        987,40                        75741                    ]42                ],43                14344            ],45            "output": []46        },47        {48            "input": [49                [50                    [51                        765,52                        245,53                        442,54                        42055                    ],56                    [57                        531,58                        902,59                        782,60                        67561                    ],62                    [63                        598,64                        622,65                        462,66                        82967                    ],68                    [69                        519,70                        17,71                        285,72                        45473                    ],74                    [75                        754,76                        818,77                        264,78                        3479                    ],80                    [81                        267,82                        54,83                        632,84                        32385                    ],86                    [87                        101,88                        332,89                        820,90                        7291                    ],92                    [93                        76,94                        579,95                        390,96                        1297                    ],98                    [99                        904,100                        523,101                        796,102                        307103                    ],104                    [105                        821,106                        209,107                        540,108                        668109                    ],110                    [111                        25,112                        603,113                        985,114                        140115                    ],116                    [117                        213,118                        823,119                        566,120                        823121                    ],122                    [123                        640,124                        78,125                        110,126                        6127                    ],128                    [129                        329,130                        508,131                        158,132                        997133                    ],134                    [135                        405,136                        840,137                        31,138                        104139                    ],140                    [141                        814,142                        139,143                        138,144                        447145                    ],146                    [147                        919,148                        935,149                        522,150                        626151                    ],152                    [153                        49,154                        25,155                        510,156                        236157                    ],158                    [159                        846,160                        119,161                        183,162                        956163                    ],164                    [165                        272,166                        849,167                        513,168                        91169                    ],170                    [171                        543,172                        726,173                        744,174                        269175                    ],176                    [177                        316,178                        561,179                        932,180                        235181                    ],182                    [183                        953,184                        843,185                        235,186                        320187                    ],188                    [189                        381,190                        895,191                        788,192                        480193                    ],194                    [195                        69,196                        477,197                        845,198                        383199                    ],200                    [201                        270,202                        102,203                        830,204                        266205                    ],206                    [207                        886,208                        406,209                        890,210                        315211                    ],212                    [213                        392,214                        835,215                        522,216                        614217                    ],218                    [219                        287,220                        313,221                        368,222                        775223                    ],224                    [225                        558,226                        67,227                        693,228                        344229                    ],230                    [231                        723,232                        564,233                        90,234                        381235                    ],236                    [237                        950,238                        571,239                        341,240                        775241                    ],242                    [243                        531,244                        909,245                        325,246                        713247                    ],248                    [249                        165,250                        201,251                        661,252                        21253                    ],254                    [255                        301,256                        689,257                        994,258                        518259                    ],260                    [261                        501,262                        132,263                        116,264                        180265                    ],266                    [267                        39,268                        232,269                        723,270                        753271                    ],272                    [273                        646,274                        578,275                        353,276                        71277                    ],278                    [279                        738,280                        287,281                        759,282                        385283                    ],284                    [285                        777,286                        553,287                        68,288                        238289                    ],290                    [291                        677,292                        13,293                        894,294                        297295                    ],296                    [297                        723,298                        155,299                        139,300                        792301                    ],302                    [303                        891,304                        272,305                        196,306                        568307                    ],308                    [309                        156,310                        356,311                        185,312                        499313                    ],314                    [315                        34,316                        756,317                        406,318                        15319                    ],320                    [321                        190,322                        243,323                        107,324                        252325                    ],326                    [327                        662,328                        547,329                        649,330                        666331                    ],332                    [333                        363,334                        726,335                        406,336                        953337                    ],338                    [339                        379,340                        496,341                        477,342                        453343                    ],344                    [345                        552,346                        954,347                        484,348                        732349                    ],350                    [351                        548,352                        238,353                        505,354                        45355                    ],356                    [357                        113,358                        679,359                        987,360                        145361                    ],362                    [363                        975,364                        463,365                        317,366                        692367                    ],368                    [369                        746,370                        540,371                        632,372                        772373                    ],374                    [375                        492,376                        257,377                        198,378                        980379                    ],380                    [381                        802,382                        838,383                        416,384                        782385                    ],386                    [387                        88,388                        315,389                        34,390                        395391                    ]392                ],393                942394            ],395            "output": []396        },397        {398            "input": [399                [400                    [401                        49,402                        533,403                        715,404                        737405                    ],406                    [407                        924,408                        897,409                        615,410                        101411                    ],412                    [413                        260,414                        131,415                        150,416                        918417                    ],418                    [419                        339,420                        462,421                        654,422                        276423                    ],424                    [425                        32,426                        767,427                        733,428                        978429                    ],430                    [431                        67,432                        883,433                        686,434                        626435                    ],436                    [437                        405,438                        321,439                        514,440                        716441                    ],442                    [443                        632,444                        376,445                        761,446                        338447                    ],448                    [449                        439,450                        1000,451                        156,452                        528453                    ],454                    [455                        87,456                        697,457                        84,458                        393459                    ],460                    [461                        684,462                        943,463                        837,464                        900465                    ],466                    [467                        326,468                        341,469                        868,470                        841471                    ],472                    [473                        142,474                        633,475                        342,476                        652477                    ],478                    [479                        294,480                        39,481                        296,482                        997483                    ],484                    [485                        35,486                        266,487                        62,488                        622489                    ],490                    [491                        11,492                        993,493                        775,494                        197495                    ],496                    [497                        893,498                        561,499                        863,500                        443501                    ],502                    [503                        92,504                        698,505                        743,506                        898507                    ],508                    [509                        793,510                        760,511                        708,512                        894513                    ],514                    [515                        548,516                        781,517                        487,518                        778519                    ],520                    [521                        289,522                        825,523                        321,524                        680525                    ],526                    [527                        628,528                        99,529                        912,530                        861531                    ],532                    [533                        627,534                        365,535                        475,536                        983537                    ],538                    [539                        669,540                        682,541                        681,542                        685543                    ],544                    [545                        914,546                        155,547                        752,548                        928549                    ],550                    [551                        649,552                        197,553                        921,554                        936555                    ],556                    [557                        135,558                        608,559                        32,560                        184561                    ],562                    [563                        270,564                        860,565                        434,566                        622567                    ],568                    [569                        815,570                        345,571                        501,572                        174573                    ],574                    [575                        819,576                        905,577                        643,578                        337579                    ],580                    [581                        644,582                        450,583                        22,584                        866585                    ],586                    [587                        120,588                        353,589                        623,590                        970591                    ],592                    [593                        458,594                        881,595                        872,596                        854597                    ],598                    [599                        547,600                        833,601                        855,602                        274603                    ],604                    [605                        121,606                        465,607                        388,608                        270609                    ],610                    [611                        175,612                        9,613                        815,614                        644615                    ],616                    [617                        157,618                        329,619                        216,620                        495621                    ],622                    [623                        398,624                        785,625                        529,626                        219627                    ],628                    [629                        896,630                        70,631                        244,632                        460633                    ],634                    [635                        943,636                        16,637                        568,638                        861639                    ],640                    [641                        363,642                        626,643                        973,644                        297645                    ],646                    [647                        397,648                        44,649                        92,650                        179651                    ],652                    [653                        494,654                        337,655                        729,656                        899657                    ],658                    [659                        750,660                        204,661                        840,662                        122663                    ],664                    [665                        37,666                        69,667                        68,668                        202669                    ],670                    [671                        452,672                        554,673                        248,674                        932675                    ],676                    [677                        540,678                        205,679                        629,680                        908681                    ],682                    [683                        756,684                        75,685                        973,686                        522687                    ],688                    [689                        60,690                        376,691                        810,692                        889693                    ],694                    [695                        351,696                        800,697                        930,698                        468699                    ],700                    [701                        352,702                        38,703                        789,704                        921705                    ],706                    [707                        929,708                        956,709                        909,710                        637711                    ],712                    [713                        246,714                        782,715                        974,716                        862717                    ],718                    [719                        495,720                        271,721                        475,722                        792723                    ],724                    [725                        106,726                        937,727                        243,728                        893729                    ],730                    [731                        922,732                        373,733                        956,734                        174735                    ],736                    [737                        177,738                        888,739                        611,740                        889741                    ],742                    [743                        963,744                        900,745                        153,746                        746747                    ],748                    [749                        395,750                        241,751                        550,752                        511753                    ],754                    [755                        202,756                        381,757                        700,758                        813759                    ],760                    [761                        471,762                        848,763                        331,764                        233765                    ],766                    [767                        299,768                        516,769                        910,770                        497771                    ],772                    [773                        293,774                        893,775                        784,776                        818777                    ],778                    [779                        773,780                        926,781                        287,782                        688783                    ],784                    [785                        306,786                        905,787                        694,788                        439789                    ],790                    [791                        682,792                        877,793                        886,794                        511795                    ],796                    [797                        195,798                        345,799                        401,800                        347801                    ],802                    [803                        271,804                        770,805                        84,806                        390807                    ],808                    [809                        22,810                        618,811                        595,812                        346813                    ],814                    [815                        71,816                        681,817                        146,818                        363819                    ],820                    [821                        604,822                        486,823                        669,824                        940825                    ],826                    [827                        980,828                        817,829                        838,830                        256831                    ],832                    [833                        691,834                        613,835                        458,836                        474837                    ],838                    [839                        820,840                        763,841                        708,842                        892843                    ],844                    [845                        671,846                        452,847                        760,848                        971849                    ],850                    [851                        654,852                        336,853                        997,854                        846855                    ],856                    [857                        806,858                        950,859                        694,860                        859861                    ],862                    [863                        309,864                        886,865                        76,866                        430867                    ],868                    [869                        74,870                        739,871                        871,872                        749873                    ],874                    [875                        510,876                        149,877                        846,878                        818879                    ],880                    [881                        361,882                        518,883                        497,884                        330885                    ],886                    [887                        586,888                        159,889                        975,890                        105891                    ],892                    [893                        548,894                        662,895                        963,896                        595897                    ],898                    [899                        856,900                        194,901                        657,902                        616903                    ]904                ],905                949906            ],907            "output": []908        },909        {910            "input": [911                [912                    [913                        81,914                        172,915                        816,916                        189917                    ],918                    [919                        809,920                        835,921                        516,922                        976923                    ],924                    [925                        397,926                        971,927                        139,928                        93929                    ],930                    [931                        681,932                        583,933                        211,934                        893935                    ],936                    [937                        280,938                        14,939                        944,940                        299941                    ],942                    [943                        376,944                        487,945                        547,946                        109947                    ],948                    [949                        967,950                        509,951                        844,952                        522953                    ],954                    [955                        50,956                        465,957                        477,958                        439959                    ],960                    [961                        816,962                        204,963                        858,964                        24965                    ],966                    [967                        909,968                        456,969                        252,970                        478971                    ],972                    [973                        696,974                        242,975                        935,976                        324977                    ],978                    [979                        917,980                        999,981                        174,982                        120983                    ],984                    [985                        852,986                        237,987                        834,988                        506989                    ],990                    [991                        296,992                        5,993                        111,994                        748995                    ],996                    [997                        706,998                        607,999                        470,1000                        1761001                    ],1002                    [1003                        511,1004                        3,1005                        181,1006                        7801007                    ],1008                    [1009                        104,1010                        121,1011                        815,1012                        5591013                    ],1014                    [1015                        30,1016                        888,1017                        987,1018                        8091019                    ],1020                    [1021                        980,1022                        646,1023                        68,1024                        6211025                    ],1026                    [1027                        151,1028                        159,1029                        847,1030                        5111031                    ],1032                    [1033                        216,1034                        153,1035                        524,1036                        811037                    ],1038                    [1039                        232,1040                        344,1041                        443,1042                        6081043                    ],1044                    [1045                        613,1046                        48,1047                        987,1048                        5671049                    ],1050                    [1051                        482,1052                        734,1053                        352,1054                        2961055                    ],1056                    [1057                        150,1058                        54,1059                        779,1060                        3871061                    ],1062                    [1063                        53,1064                        208,1065                        939,1066                        2121067                    ],1068                    [1069                        999,1070                        667,1071                        907,1072                        7121073                    ],1074                    [1075                        527,1076                        974,1077                        693,1078                        2751079                    ],1080                    [1081                        589,1082                        415,1083                        593,1084                        2511085                    ],1086                    [1087                        817,1088                        108,1089                        592,1090                        6531091                    ],1092                    [1093                        925,1094                        383,1095                        642,1096                        8631097                    ],1098                    [1099                        409,1100                        263,1101                        441,1102                        2881103                    ],1104                    [1105                        524,1106                        586,1107                        918,1108                        2661109                    ],1110                    [1111                        248,1112                        923,1113                        220,1114                        7641115                    ],1116                    [1117                        936,1118                        616,1119                        521,1120                        1061121                    ],1122                    [1123                        599,1124                        688,1125                        72,1126                        8191127                    ],1128                    [1129                        762,1130                        876,1131                        429,1132                        4941133                    ],1134                    [1135                        353,1136                        724,1137                        774,1138                        3941139                    ],1140                    [1141                        449,1142                        376,1143                        358,1144                        8611145                    ],1146                    [1147                        223,1148                        743,1149                        609,1150                        5071151                    ],1152                    [1153                        279,1154                        890,1155                        182,1156                        3811157                    ],1158                    [1159                        407,1160                        227,1161                        318,1162                        2921163                    ],1164                    [1165                        282,1166                        543,1167                        533,1168                        8921169                    ],1170                    [1171                        821,1172                        464,1173                        352,1174                        2131175                    ],1176                    [1177                        294,1178                        289,1179                        509,1180                        7591181                    ]1182                ],1183                9571184            ],1185            "output": []1186        },1187        {1188            "input": [1189                [1190                    [1191                        6,1192                        114,1193                        977,1194                        5091195                    ],1196                    [1197                        992,1198                        896,1199                        940,1200                        360

Showing the first 1,200 of 2189 lines. Download the file for the rest.