FPEvalDataset/LeetCodeProblem
0305
1{2 "id": 2694,3 "name": "find_the_maximum_divisibility_score",4 "difficulty": "Easy",5 "link": "https://leetcode.com/problems/find-the-maximum-divisibility-score/",6 "date": "1680998400000",7 "task_description": "You are given two integer arrays `nums` and `divisors`. The **divisibility score** of `divisors[i]` is the number of indices `j` such that `nums[j]` is divisible by `divisors[i]`. Return the integer `divisors[i]` with the **maximum** divisibility score. If multiple integers have the maximum score, return the smallest one. **Example 1:** **Input:** nums = [2,9,15,50], divisors = [5,3,7,2] **Output:** 2 **Explanation:** The divisibility score of `divisors[0]` is 2 since `nums[2]` and `nums[3]` are divisible by 5. The divisibility score of `divisors[1]` is 2 since `nums[1]` and `nums[2]` are divisible by 3. The divisibility score of `divisors[2]` is 0 since none of the numbers in `nums` is divisible by 7. The divisibility score of `divisors[3]` is 2 since `nums[0]` and `nums[3]` are divisible by 2. As `divisors[0]`, `divisors[1]`, and `divisors[3]` have the same divisibility score, we return the smaller one which is `divisors[3]`. **Example 2:** **Input:** nums = [4,7,9,3,9], divisors = [5,2,3] **Output:** 3 **Explanation:** The divisibility score of `divisors[0]` is 0 since none of numbers in `nums` is divisible by 5. The divisibility score of `divisors[1]` is 1 since only `nums[0]` is divisible by 2. The divisibility score of `divisors[2]` is 3 since `nums[2]`, `nums[3]` and `nums[4]` are divisible by 3. **Example 3:** **Input:** nums = [20,14,21,10], divisors = [10,16,20] **Output:** 10 **Explanation:** The divisibility score of `divisors[0]` is 2 since `nums[0]` and `nums[3]` are divisible by 10. The divisibility score of `divisors[1]` is 0 since none of the numbers in `nums` is divisible by 16. The divisibility score of `divisors[2]` is 1 since `nums[0]` is divisible by 20. **Constraints:** `1 <= nums.length, divisors.length <= 1000` `1 <= nums[i], divisors[i] <= 109`",8 "public_test_cases": [9 {10 "label": "Example 1",11 "input": "nums = [2,9,15,50], divisors = [5,3,7,2]",12 "output": "2 "13 },14 {15 "label": "Example 2",16 "input": "nums = [4,7,9,3,9], divisors = [5,2,3]",17 "output": "3 "18 },19 {20 "label": "Example 3",21 "input": "nums = [20,14,21,10], divisors = [10,16,20]",22 "output": "10 "23 }24 ],25 "private_test_cases": [26 {27 "input": [28 [29 947539931,30 883132207,31 571688406,32 188974183,33 265200952,34 272093043,35 842547240,36 915143799,37 764733519,38 59229926,39 139686592,40 655974118,41 398270381,42 649089695,43 348752844,44 589222085,45 916919622,46 589491913,47 849421589,48 715413496,49 928097927,50 593371630,51 117132488,52 13386784,53 462427393,54 366598135,55 53954553,56 564534000,57 202337394,58 48799781,59 771995248,60 570470261,61 45825924,62 863861201,63 368517689,64 816349653,65 996744242,66 964731509,67 383255042,68 267583249,69 701321349,70 210166775,71 62327100,72 243474191,73 61586330,74 766080353,75 278985885,76 526289282,77 868540843,78 420544363,79 306856052,80 24492908,81 882581113,82 720681927,83 739157639,84 317624542,85 256310534,86 638975370,87 305070517,88 222364652,89 253891943,90 776947685,91 42987368,92 548220708,93 15208997,94 888830650,95 436973253,96 377271619,97 989379005,98 459739040,99 838892175,100 559561450,101 424948503,102 773352226,103 612381490,104 71496354,105 828958504,106 81925008,107 731593570,108 338166026,109 592113779,110 61167616,111 778169946,112 578570144,113 911822245,114 162588290,115 310278234,116 447020685,117 421319341,118 554947738,119 477932035,120 388168116,121 364734379,122 565636770,123 527782555,124 633524833,125 95274073,126 19879207,127 625271093,128 286534737,129 180227676,130 524033110,131 865403643,132 988686434,133 477814753,134 634593879,135 554848165,136 866118747,137 737417829,138 974098717,139 921984456,140 51992233,141 487884401,142 721849926,143 599286664,144 111241717,145 12667466,146 637130935,147 874665229,148 425992846,149 819882355,150 64105538,151 233474237,152 684307359,153 658518752,154 112157008,155 818370975,156 923245950,157 664828953,158 975438073,159 761050122,160 500735783,161 501621895,162 409623168,163 941341643,164 323749175,165 337481555,166 828106538,167 510498552,168 741916014,169 953773846,170 403708714,171 727637220,172 203995104,173 832834516,174 813977123,175 682837990,176 737363368,177 329321505,178 217818731,179 762962258,180 999171294,181 234384615,182 201477980,183 634835380,184 208852570,185 358973182,186 943164806,187 158162550,188 835424766,189 280272593,190 715679172,191 557272043,192 339975019,193 938572329,194 291207699,195 180890536,196 512900377,197 478201798,198 283769310,199 412041814,200 868748228,201 972163874,202 876120012,203 301428767,204 968922783,205 229095907,206 669608825,207 767129017,208 744414712,209 255237354,210 698296233,211 77059357,212 215936487,213 767170079,214 416729173,215 989735858,216 574644023,217 116107326,218 507722701,219 988911896,220 472125413,221 746262192,222 283682288,223 524404603,224 293778126,225 225843571,226 916760169,227 748384574,228 572717912,229 421744385,230 916568223,231 667076615,232 441574557,233 201382106,234 110865303,235 229939265,236 960289779,237 13849060,238 99405528,239 218387810,240 30508171,241 538495070,242 47340917,243 967243693,244 668871287,245 470314740,246 426528596,247 197470373,248 961027939,249 331807899,250 788260960,251 17316281,252 683229121,253 936150965,254 379720130,255 238780469,256 752063108,257 259874982,258 344528052,259 479997387,260 146296369,261 603635873,262 149481518,263 452202823,264 887222295265 ],266 [267 414552342,268 206382371,269 894294202,270 151070721,271 32287797,272 943205437,273 422459756,274 844503665,275 572011499,276 54847291,277 977354589,278 202763852,279 655479565,280 805232991,281 489174987,282 138084702,283 708019767,284 776574637,285 163456814,286 328784713,287 152496016,288 997543317,289 897392871,290 769954082,291 675411293,292 897720812,293 851733225,294 966838997,295 677161269,296 358053750,297 103880302,298 725427179,299 13654244,300 146912508,301 67064110,302 3841615,303 427851428,304 70239867,305 419246177,306 370961629,307 710907787,308 514727825,309 141375448,310 197586867,311 495535360,312 936522452,313 812142534,314 32062308,315 494256291,316 798154914,317 516150293,318 410682309,319 108613685,320 837810119,321 348087749,322 67516085,323 176604733,324 275177732,325 678728103,326 325446781,327 320294597,328 841361774,329 728713157,330 914863346,331 598997762,332 970062058,333 872676488,334 816879366,335 237465164,336 811029947,337 49775985,338 82153222,339 10741560,340 315401555,341 526034542,342 751113851,343 88300306,344 264359694,345 393234833,346 150595138,347 841448367,348 788641292,349 574177746,350 85554581,351 306154153,352 712245250,353 922658430,354 859060333,355 518696407,356 468402621,357 202690050,358 3955142,359 195160983,360 108251430,361 653885476,362 224525759,363 942318372,364 452348883,365 268654650,366 822443433,367 803193177,368 445518746,369 17193347,370 452073349,371 185612404,372 400862240,373 277436933,374 524397717,375 296264264,376 39560424,377 31443170,378 732399120,379 773824476,380 341664392,381 929384496,382 911644291,383 474862283,384 676956718,385 403768725,386 746007481,387 964269547,388 740136409,389 983312150,390 594001674,391 635852289,392 832143873,393 566954735,394 79532940,395 153004647,396 797682606,397 898472442,398 714447114,399 567525390,400 691045904,401 716986716,402 153109688,403 816831196,404 402680752,405 364272815,406 628520881,407 923546851,408 197157038,409 51866533,410 96859089,411 414070550,412 27412474,413 286299682,414 889795941,415 974183756,416 858453427,417 801796555,418 16752762,419 596629869,420 209223573,421 573268852,422 227148496,423 994869979,424 324139878,425 766266552,426 698442306,427 951225538,428 723845569,429 280822356,430 350220575,431 200803478,432 866347123,433 677055863,434 277860478,435 302116736,436 762818480,437 79088485,438 935364807,439 27378245,440 235343320,441 389335674,442 559408582,443 905809388,444 419661183,445 995198703,446 809720471,447 620913289,448 373052002,449 696973664,450 881033415,451 81416616,452 902573151,453 390581446,454 848561958,455 755078324,456 730475335,457 328937424,458 509373420,459 884897155,460 524643010,461 236977025,462 544865398,463 938824813,464 433490054,465 455119784,466 922667091,467 596712235,468 444307445,469 250005556,470 782558315,471 635653484,472 450210876,473 939158002,474 65881681,475 777706293,476 685998473,477 99068051,478 623227852,479 773653378,480 74559350,481 923301218,482 117844858,483 939368781,484 570227896,485 140417533,486 883481638,487 698362758,488 507675386,489 939584105,490 265237820,491 773580518,492 462881398,493 341449954,494 74437105,495 588528033,496 148689111,497 782214221,498 806243575,499 757909821,500 57084724,501 222495458,502 32496161,503 691064285,504 848398353,505 621792239,506 421574412,507 956201955,508 553273715,509 800722551,510 824743414,511 68740927,512 889162448,513 630787207,514 920447359,515 52191717,516 554746267,517 620914910,518 211886939,519 294596190,520 772773085,521 802237547,522 808544907,523 947981072,524 803820550,525 167824031,526 416577840,527 828654894,528 700242795,529 859008378,530 587970354,531 78179034,532 996762869,533 736218816,534 737892561,535 390547793,536 200645677,537 264806978,538 606252473,539 174966059,540 235122139,541 172527907,542 24139416,543 31630763,544 877938802,545 470742276,546 714496034,547 511101157,548 183368544,549 268431713,550 70158298,551 327617850,552 575304001,553 30481620,554 357141628,555 861162435,556 403740821,557 899074911,558 351641653,559 102080320,560 804538696,561 903316579,562 907032324,563 566312189,564 481630597,565 388313526,566 886462453,567 944691067,568 531667569,569 116455293,570 139184927,571 321138752,572 411988071,573 75848756,574 109043814,575 846925794,576 260510709,577 682987073,578 281478190,579 413143213,580 183596298,581 670827157,582 603811213,583 563578728,584 658688198,585 53672144,586 618926190,587 617296881,588 131094745,589 959245020,590 356612736,591 993032568,592 999502144,593 718235352,594 139292457,595 868054904,596 92953982,597 483376391,598 150579915,599 162954233,600 373649221,601 221224305,602 903030494,603 599416040,604 318644846,605 369378545,606 749951532,607 3911457,608 658001464,609 172356285,610 191440215,611 522582437,612 63084234,613 204278204,614 124051865,615 85110167,616 445934724,617 18221738,618 754067221,619 727460100,620 890069905,621 76958984,622 599629977,623 140131276,624 313476560,625 165173627,626 255478569,627 121829461,628 317808813,629 861773177,630 491441538,631 536225719,632 449501714,633 532858259,634 750902478,635 292154143,636 984505566,637 888909913,638 220390896,639 82524360,640 537942122,641 323380131,642 432526768,643 983761004,644 477103491,645 275129514,646 447233114,647 87517507,648 237585929,649 875727038,650 661631282,651 506268946,652 751896567,653 27860297,654 480163089,655 591340435,656 609985084,657 715691808,658 768117280,659 389828263,660 581237210,661 222234298,662 567901758,663 274392364,664 587279663,665 769106116,666 196635846,667 110175314,668 776219746,669 207233251,670 857627717,671 374962240,672 409720489,673 841228078,674 282415879,675 860783927,676 165539633,677 615580225,678 444832794,679 275546225,680 8445871,681 395944134,682 572816635,683 740186988,684 669764394,685 821180690,686 867462101,687 401974935,688 829551535,689 567617888,690 392044367,691 795036859,692 659621,693 193314844,694 401733957,695 254516473,696 847368333,697 707697178,698 792763780,699 348737398,700 661838838,701 254451857,702 377319622,703 685527783,704 607239154,705 642711504,706 971304885,707 555171964,708 552099181,709 200265872,710 332217536,711 577868109,712 660278566,713 762828040,714 498103141,715 434548023,716 510748979,717 203102858,718 283958551,719 47087095,720 485266936,721 716867171,722 479875905,723 381299454,724 188888485,725 815041781,726 838403684,727 278557029,728 720076938,729 475711468,730 203265859,731 529096699,732 558929187,733 808671137,734 75719672,735 671128024,736 739569658,737 599354906,738 944981429,739 777160659,740 762099094,741 643894435,742 899202360,743 377856461,744 673464628,745 232782150,746 773957433,747 403628748,748 620705971,749 422519434,750 861988087,751 67649631,752 656445120,753 798499896,754 413582348,755 75688621,756 672692125,757 139156468,758 547347819,759 755017558,760 153285023,761 755815785,762 215926828,763 523944759,764 511732178,765 570212450,766 279025025,767 214171499,768 484340723,769 557031983,770 319585407,771 763362868,772 929358727,773 627059855,774 748963114,775 218158132,776 531672738,777 13611718,778 962718125,779 425037813,780 571505990,781 876350174,782 621530753,783 616272580,784 838504324,785 666284113,786 147390397,787 328364317,788 406002273,789 420104497,790 934241234,791 846018039,792 657536292,793 933557890,794 840827343,795 220747258,796 636925579,797 803630846,798 646010336,799 249674181,800 330054993,801 201672854,802 507466848,803 493052353,804 901260613,805 987604176,806 370285997,807 803770919,808 62270580,809 504543260,810 222344324,811 555016647,812 432168833,813 201527468,814 476293791,815 219345363,816 893230362,817 778278211,818 271130823,819 683398661,820 507284987,821 301464734,822 505966329,823 500738100,824 769364927,825 594874973,826 413914215,827 740171486,828 807095331,829 232573506,830 441700616,831 572005076,832 243592168,833 937512618,834 849580331,835 817480946,836 796876719,837 982942273,838 62304356,839 394045271,840 320642823,841 413130244,842 983654518,843 338946103,844 61516553,845 596151696,846 264083586,847 590591576,848 249773746,849 551842650,850 911389205,851 348908805,852 260260957,853 822223418,854 796308945,855 309437465,856 580757959,857 393577770,858 991255678,859 41274785,860 526403736,861 517026291,862 414460458,863 386021069,864 379249324,865 727614516,866 883205420,867 387231635,868 972189929,869 284977008,870 200832097,871 677227962,872 341991904,873 867600286,874 707896444,875 636077626,876 697846559,877 444531823,878 142901591,879 576304464,880 905659950,881 767880424,882 783374006,883 13672862,884 614328021,885 178839905,886 154489993,887 887255357,888 951425479,889 665496716,890 114149784,891 374386888,892 207936135,893 758068566,894 727068222,895 946006571,896 204560576,897 830163175,898 349460674,899 984375240,900 708174443,901 535738785,902 798675253,903 758213476,904 939018032,905 377464884,906 528075910,907 72333914,908 646137792909 ]910 ],911 "output": 659621912 },913 {914 "input": [915 [916 8066631,917 947265032,918 612434386,919 993055287,920 396613676,921 506066456,922 16721904,923 408260547,924 852373035,925 522696295,926 16261082,927 803219144,928 830039756,929 238127429,930 234087905,931 637575426,932 366076272,933 45493718,934 999101343,935 319161481,936 531402466,937 10891583,938 838799041,939 88002196,940 997935836,941 920324763,942 595660374,943 609576953,944 86039297,945 433241688,946 398904603,947 27977026,948 151810161,949 511128043,950 960403208,951 60533231,952 121409947,953 27039282,954 666852462,955 148031694,956 673123276,957 562921883,958 436743216,959 827672293,960 553370692,961 130264014,962 848533943,963 568362339,964 192902261,965 990831669,966 891517859,967 114649270,968 444904991,969 386498296,970 797862053,971 407422725,972 560472741,973 194368097,974 443315133,975 585486014,976 812535264,977 464703115,978 23640055,979 55811482,980 907906556,981 378046555,982 471631193,983 289727702,984 983288904,985 922871518,986 54963975,987 835463417,988 802763407,989 678450571,990 310552339,991 508707267,992 961254640,993 671816196,994 132921114,995 999020176,996 681411377,997 456974355,998 507285612,999 282813596,1000 934265493,1001 656507467,1002 786736,1003 721399223,1004 415001000,1005 502723238,1006 85224660,1007 787724338,1008 768561312,1009 535662845,1010 264347635,1011 446521713,1012 65144411,1013 789526879,1014 950523836,1015 663414949,1016 18190258,1017 15650731,1018 88218461,1019 452382673,1020 346237082,1021 19972657,1022 691574949,1023 711303066,1024 568291806,1025 490690953,1026 468379076,1027 150764419,1028 329757525,1029 675342095,1030 837314261,1031 214674897,1032 440888515,1033 346886973,1034 973451339,1035 599011101,1036 652595008,1037 99150747,1038 89051688,1039 109956322,1040 652559024,1041 48973447,1042 331761704,1043 875153665,1044 478017995,1045 451429499,1046 810182270,1047 796909900,1048 812681994,1049 995749877,1050 932847959,1051 238961680,1052 767969633,1053 379922843,1054 581828230,1055 266237134,1056 969942939,1057 881213799,1058 473738646,1059 8186968,1060 5117451,1061 165382816,1062 759130838,1063 379608648,1064 76930805,1065 327716580,1066 32502654,1067 57824579,1068 892148566,1069 469031885,1070 904670586,1071 280108933,1072 6146199,1073 872570124,1074 449981245,1075 31464954,1076 264671506,1077 630925999,1078 134969418,1079 270764985,1080 161416373,1081 37280196,1082 270915141,1083 469229481,1084 540679655,1085 855163649,1086 905097080,1087 460468845,1088 96010037,1089 840572459,1090 185913972,1091 324302688,1092 614806067,1093 605272335,1094 260089012,1095 7174513,1096 358561206,1097 224657596,1098 415579799,1099 848915420,1100 903278203,1101 591650998,1102 944352764,1103 346369766,1104 849674643,1105 300452144,1106 386381109,1107 196070504,1108 493660491,1109 91208525,1110 971492845,1111 320139305,1112 597801719,1113 331244959,1114 976278046,1115 820345524,1116 42600309,1117 620765051,1118 941465325,1119 157049473,1120 566148166,1121 934081725,1122 992544453,1123 373289189,1124 111371665,1125 424813533,1126 67878637,1127 585413546,1128 951768070,1129 349223610,1130 741331863,1131 59336363,1132 61814663,1133 347287215,1134 742992552,1135 353211927,1136 707233034,1137 969527021,1138 778286156,1139 573683635,1140 912375074,1141 817720440,1142 387495663,1143 110023571,1144 170424898,1145 611336249,1146 903939469,1147 784463396,1148 394401207,1149 79862506,1150 493389187,1151 56907720,1152 717534133,1153 779341591,1154 593081088,1155 743820218,1156 901007176,1157 373960460,1158 376195642,1159 147615330,1160 183117383,1161 266467558,1162 993588115,1163 126407303,1164 602136613,1165 249135602,1166 581577899,1167 823637835,1168 783178459,1169 427497635,1170 285452826,1171 223791706,1172 35818788,1173 212721778,1174 965867402,1175 14781215,1176 505128189,1177 512218730,1178 944794268,1179 762674541,1180 295245373,1181 323576162,1182 213144659,1183 54086913,1184 216584931,1185 864497219,1186 275701588,1187 724678372,1188 449171168,1189 873422869,1190 929918073,1191 924824198,1192 683004261,1193 304389156,1194 966324557,1195 574043482,1196 262282284,1197 643257748,1198 714913899,1199 613798188,1200 484684286,