FPEvalDataset/LeetCodeProblem
0302
1{2 "id": 2525,3 "name": "count_number_of_distinct_integers_after_reverse_operations",4 "difficulty": "Medium",5 "link": "https://leetcode.com/problems/count-number-of-distinct-integers-after-reverse-operations/",6 "date": "1665273600000",7 "task_description": "You are given an array `nums` consisting of **positive** integers. You have to take each integer in the array, **reverse its digits**, and add it to the end of the array. You should apply this operation to the original integers in `nums`. Return _the number of **distinct** integers in the final array_. **Example 1:** ``` **Input:** nums = [1,13,10,12,31] **Output:** 6 **Explanation:** After including the reverse of each number, the resulting array is [1,13,10,12,31,1,31,1,21,13]. The reversed integers that were added to the end of the array are underlined. Note that for the integer 10, after reversing it, it becomes 01 which is just 1. The number of distinct integers in this array is 6 (The numbers 1, 10, 12, 13, 21, and 31). ``` **Example 2:** ``` **Input:** nums = [2,2,2] **Output:** 1 **Explanation:** After including the reverse of each number, the resulting array is [2,2,2,2,2,2]. The number of distinct integers in this array is 1 (The number 2). ``` **Constraints:** `1 <= nums.length <= 105` `1 <= nums[i] <= 106`",8 "public_test_cases": [9 {10 "label": "Example 1",11 "input": "nums = [1,13,10,12,31]",12 "output": "6 "13 },14 {15 "label": "Example 2",16 "input": "nums = [2,2,2]",17 "output": "1 "18 }19 ],20 "private_test_cases": [21 {22 "input": [23 219025,24 852267,25 489536,26 489142,27 235052,28 33997,29 976728,30 82266,31 739408,32 571338,33 928919,34 833402,35 919498,36 884724,37 516540,38 750024,39 232181,40 99882,41 759176,42 437674,43 813975,44 22310,45 798860,46 811617,47 408502,48 265748,49 208174,50 694779,51 389557,52 936116,53 482365,54 658733,55 147226,56 326530,57 707960,58 433199,59 889378,60 135114,61 440531,62 729423,63 611467,64 830188,65 80809,66 823032,67 251744,68 414987,69 471739,70 320169,71 190320,72 535900,73 745263,74 28950,75 890092,76 533264,77 21136,78 723485,79 719065,80 151954,81 183116,82 905075,83 967009,84 544145,85 450881,86 190843,87 544530,88 402682,89 443609,90 269676,91 770129,92 975130,93 976218,94 361292,95 920704,96 280606,97 264837,98 735341,99 105053,100 369944,101 204623,102 853775,103 676921,104 395189,105 278594,106 349738,107 466415,108 634582,109 180806,110 493066,111 219991,112 154862,113 6714,114 244063,115 253700,116 35399,117 681054,118 474444,119 505972,120 460406,121 67207,122 409348,123 207959,124 561558,125 567907,126 500056,127 831529,128 551453,129 566225,130 610784,131 178534,132 818090,133 362908,134 480133,135 390982,136 539543,137 413372,138 927970,139 225876,140 675490,141 968056,142 530531,143 878361,144 256603,145 790245,146 140227,147 780687,148 213614,149 505832,150 787013,151 55549,152 552775,153 470465,154 429908,155 133721,156 930109,157 52105,158 684179,159 295514,160 935215,161 197701,162 583400,163 249112,164 248231,165 761287,166 308197,167 484303,168 745707,169 688297,170 459368,171 9565,172 796421,173 79014,174 737525,175 221088,176 154556,177 514265,178 228023,179 558677,180 537190,181 463887,182 479118,183 23133,184 722370,185 438572,186 62804,187 865669,188 593885,189 18784,190 276594,191 713193,192 603834,193 688750,194 878598,195 423399,196 243804,197 149689,198 334048,199 191084,200 894592,201 789363,202 515147,203 572699,204 872245,205 746015,206 636008,207 928504,208 690798,209 373641,210 403008,211 844145,212 770451,213 644355,214 308534,215 379372,216 181061,217 811383,218 658247,219 580387,220 459557,221 773163,222 629418,223 211430,224 271389,225 630451,226 378052,227 234509,228 777231,229 513583,230 913844,231 440312,232 611728,233 938403,234 754563,235 967304,236 963157,237 598812,238 686408,239 497616,240 512371,241 531372,242 465556,243 439960,244 700280,245 54685,246 883650,247 942119,248 783786,249 388604,250 606863,251 661621,252 119343,253 455413,254 838107,255 480526,256 991608,257 417033,258 902974,259 998384,260 391815,261 503195,262 613248,263 439773,264 769031,265 771730,266 630526,267 411417,268 75122,269 58441,270 205785,271 767699,272 979832,273 949467,274 862365,275 945908,276 4341,277 401817,278 362285,279 459076,280 760152,281 282142,282 911542,283 248790,284 741484,285 987798,286 188741,287 618488,288 289591,289 733997,290 506997,291 159966,292 851749,293 425213,294 183097,295 865453,296 116544,297 587173,298 262620,299 290084,300 52030,301 977115,302 74617,303 723898,304 389951,305 310554,306 716190,307 779103,308 555141,309 608272,310 938993,311 18743,312 659066,313 89416,314 278339,315 546049,316 888777,317 912621,318 548348,319 517106,320 703488,321 542141,322 354094,323 823654,324 725910,325 222631,326 893772,327 480255,328 623798,329 750999,330 452228,331 435547,332 87342,333 902934,334 701277,335 708096,336 955630,337 255797,338 301550,339 647096,340 848657,341 538222,342 448666,343 926593,344 873210,345 139248,346 869886,347 199652,348 236067,349 266965,350 561703,351 794575,352 188439,353 735157,354 701433,355 442258,356 184760,357 430770,358 472469,359 32185,360 571285,361 861619,362 856546,363 82635,364 579309,365 449738,366 790733,367 140962,368 485055,369 369027,370 257550,371 791875,372 232758,373 237808,374 903534,375 500772,376 202766,377 200436,378 857217,379 423355,380 498471,381 131884,382 415856,383 298820,384 297337,385 795295,386 685914,387 719717,388 729117,389 801372,390 385958,391 146935,392 316142,393 812163,394 720221,395 683421,396 691171,397 452618,398 247150,399 236336,400 23220,401 37384,402 599707,403 70027,404 52333,405 27290,406 154769,407 865073,408 408086,409 906915,410 366023,411 295964,412 955568,413 174762,414 977948,415 739704,416 260391,417 898835,418 634749,419 467964,420 767637,421 177903,422 314728,423 569264,424 2617,425 984668,426 238969,427 176483,428 31914,429 586864,430 437810,431 527120,432 525944,433 439243,434 423948,435 839898,436 76208,437 432191,438 415416,439 223581,440 854696,441 982675,442 128934,443 184967,444 34950,445 965226,446 720463,447 883559,448 860486,449 182289,450 413120,451 801211,452 364406,453 770827,454 236612,455 50937,456 328422,457 272448,458 90134,459 761389,460 838300,461 826890,462 97283,463 312186,464 635242,465 559596,466 766871,467 921444,468 792383,469 190238,470 111877,471 75356,472 770453,473 779997,474 17675,475 494553,476 300292,477 425636,478 9752,479 597141,480 442557,481 958657,482 634202,483 128013,484 841371,485 380013,486 857841,487 36366,488 749908,489 293173,490 468415,491 304325,492 584628,493 688422,494 912942,495 704889,496 982874,497 506479,498 757747,499 183164,500 444134,501 522885,502 171418,503 677383,504 927860,505 817434,506 317597,507 790192,508 704373,509 298818,510 1979,511 58572,512 235779,513 580549,514 369612,515 791850,516 420382,517 482153,518 807611,519 827180,520 733851,521 252083,522 453525,523 280518,524 654909,525 462773,526 446955,527 828381,528 234759,529 542541,530 49971,531 716152,532 533201,533 150690,534 47723,535 429904,536 241765,537 400082,538 333483,539 464276,540 694212,541 180154,542 376471,543 935719,544 208697,545 535155,546 234648,547 342570,548 306563,549 536243,550 69644,551 364890,552 372158,553 354525,554 617195,555 390753,556 488966,557 518212,558 542928,559 164020,560 783088,561 943422,562 480236,563 281107,564 181639,565 213405,566 457299,567 368811,568 345309,569 517432,570 804198,571 995066,572 587770,573 264259,574 670736,575 557001,576 222515,577 906516,578 933921,579 679365,580 328592,581 332988,582 552441,583 490422,584 97471,585 959349,586 372510,587 390961,588 944453,589 712155,590 110962,591 931157,592 566059,593 91259,594 638526,595 741722,596 579208,597 383928,598 785796,599 423208,600 710378,601 441704,602 276246,603 367696,604 749868,605 895898,606 912443,607 195585,608 220613,609 71734,610 111142,611 541487,612 126676,613 77216,614 97441,615 277629,616 673150,617 594187,618 747011,619 578668,620 842822,621 333251,622 554710,623 103732,624 446468,625 943672,626 800384,627 924739,628 834197,629 218157,630 114331,631 971790,632 581475,633 551823,634 176950,635 110652,636 731586,637 871590,638 623928,639 839549,640 671684,641 249074,642 460170,643 390129,644 436352,645 483952,646 171137,647 186543,648 953208,649 277830,650 430910,651 846529,652 6124,653 810349,654 614407,655 33270,656 208038,657 994885,658 854275,659 613892,660 908676,661 569587,662 417756,663 971028,664 620032,665 858719,666 83226,667 49422,668 188074,669 97659,670 621544,671 310892,672 197202,673 455280,674 349042,675 713491,676 234515,677 848839,678 167715,679 639906,680 297558,681 570382,682 889336,683 584563,684 426914,685 519253,686 819700,687 115019,688 310593,689 279660,690 908805,691 593616,692 390298,693 548945,694 254117,695 172241,696 84334,697 374853,698 129473,699 514643,700 952442,701 804836,702 416225,703 591158,704 205947,705 108596,706 514639,707 750737,708 709955,709 572776,710 802085,711 86298,712 231573,713 85337,714 66034,715 139103,716 252812,717 895622,718 948940,719 341357,720 395914,721 449255,722 412791,723 280918,724 835396,725 207143,726 45750,727 600784,728 84347,729 819680,730 168477,731 795734,732 536884,733 194201,734 937475,735 878227,736 764681,737 852690,738 468948,739 511115,740 402452,741 923814,742 568598,743 460981,744 322097,745 305462,746 443785,747 807206,748 42278,749 530695,750 212186,751 966138,752 889618,753 906835,754 579462,755 530203,756 419404,757 22590,758 327223,759 648453,760 899297,761 261121,762 799424,763 755525,764 944753,765 762754,766 688705,767 240491,768 319208,769 798016,770 458946,771 51453,772 326197,773 512152,774 797678,775 375469,776 949732,777 112042,778 874017,779 484697,780 393126,781 841459,782 158183,783 313213,784 868789,785 897217,786 167233,787 748903,788 697566,789 96038,790 63255,791 199003,792 814910,793 961486,794 505844,795 766148,796 999970,797 309432,798 923545,799 289387,800 823863,801 973236,802 574459,803 743936,804 572073,805 458337,806 26417,807 394583,808 413647,809 389000,810 765800,811 609627,812 399898,813 673892,814 900905,815 363398,816 608223,817 472069,818 731353,819 231399,820 663129,821 80558,822 384977,823 284069,824 373043,825 847159,826 700391,827 774266,828 178463,829 785989,830 433422,831 689883,832 683916,833 853246,834 984037,835 326489,836 684034,837 280482,838 818942,839 141402,840 474170,841 883019,842 501302,843 750590,844 664448,845 390183,846 577259,847 615149,848 248168,849 472862,850 842986,851 407862,852 788958,853 701923,854 807575,855 417448,856 446625,857 304580,858 596983,859 253447,860 620993,861 117677,862 162381,863 209002,864 944128,865 340728,866 582652,867 856100,868 76604,869 353919,870 385535,871 44069,872 126662,873 990440,874 308388,875 116064,876 539561,877 877208,878 576825,879 274141,880 3447,881 373218,882 933796,883 461885,884 609382,885 188482,886 686184,887 778835,888 732794,889 506201,890 663593,891 320938,892 814957,893 784817,894 727125,895 686200,896 733935,897 617651,898 723910,899 124062,900 547137,901 516313,902 78714,903 12998,904 500417,905 236634,906 388238,907 429319,908 451179,909 197970,910 703413,911 697456,912 219767,913 806524,914 883542,915 727912,916 310100,917 665820,918 192878,919 852862,920 246340,921 937748,922 680411,923 705945,924 268361,925 21012,926 161462,927 833613,928 661391,929 231898,930 924513,931 175674,932 692093,933 847242,934 483164,935 107318,936 691694,937 265553,938 360176,939 157307,940 297931,941 560978,942 275434,943 751400,944 657838,945 820979,946 609920,947 202136,948 688263,949 126164,950 122883,951 677086,952 847796,953 38009,954 819787,955 113808,956 238967,957 338631,958 840780,959 108933,960 584044,961 154460,962 929525,963 316703,964 256475,965 693101,966 57986,967 438102,968 913019,969 624173,970 862549,971 6176,972 56729,973 187724,974 132120,975 914979,976 363523,977 239648,978 182215,979 645630,980 520218,981 175935,982 826294,983 345915,984 169634,985 909369,986 307135,987 837506,988 671829,989 914929,990 983368,991 873411,992 399128,993 705888,994 14595,995 182608,996 864915,997 525195,998 763770,999 780383,1000 450359,1001 259809,1002 868803,1003 172584,1004 701471,1005 216899,1006 296802,1007 941511,1008 821149,1009 161852,1010 861440,1011 953077,1012 487274,1013 472769,1014 316541,1015 984715,1016 645749,1017 422992,1018 38667,1019 80522,1020 48947,1021 779876,1022 401462,1023 657292,1024 458394,1025 202687,1026 356861,1027 606060,1028 83526,1029 381168,1030 431888,1031 722825,1032 181688,1033 253354,1034 583122,1035 204716,1036 905425,1037 201248,1038 877371,1039 760676,1040 291308,1041 917546,1042 898127,1043 233188,1044 265648,1045 749195,1046 954797,1047 910731,1048 524447,1049 842009,1050 995314,1051 841046,1052 257538,1053 741314,1054 872263,1055 758311,1056 487178,1057 701585,1058 249656,1059 465991,1060 931480,1061 158542,1062 793887,1063 37644,1064 787783,1065 512917,1066 442321,1067 290401,1068 77719,1069 375575,1070 477158,1071 582318,1072 514164,1073 928073,1074 574986,1075 569863,1076 640345,1077 531801,1078 973018,1079 829474,1080 547089,1081 280459,1082 120454,1083 641385,1084 283253,1085 898982,1086 513566,1087 197088,1088 635426,1089 699352,1090 665531,1091 847348,1092 885806,1093 394071,1094 799520,1095 134536,1096 56074,1097 427321,1098 865391,1099 301327,1100 926518,1101 12190,1102 260269,1103 43152,1104 951292,1105 479152,1106 587626,1107 628238,1108 501330,1109 246260,1110 910041,1111 792124,1112 143999,1113 957566,1114 383085,1115 911526,1116 842668,1117 703992,1118 856537,1119 70307,1120 179680,1121 380813,1122 684393,1123 622289,1124 381790,1125 309967,1126 274167,1127 697854,1128 711639,1129 669959,1130 279555,1131 551723,1132 360757,1133 211644,1134 88333,1135 74104,1136 8280,1137 514081,1138 668609,1139 182901,1140 238997,1141 119669,1142 916009,1143 121942,1144 427921,1145 736770,1146 164090,1147 720568,1148 971220,1149 989689,1150 401756,1151 600611,1152 207244,1153 574265,1154 591459,1155 948171,1156 163601,1157 241347,1158 222788,1159 53658,1160 148203,1161 797875,1162 820289,1163 676914,1164 173236,1165 121246,1166 507380,1167 887035,1168 374176,1169 574033,1170 608067,1171 451752,1172 322282,1173 745281,1174 116830,1175 330106,1176 111174,1177 963814,1178 251744,1179 637476,1180 414868,1181 157545,1182 146467,1183 637435,1184 180090,1185 98912,1186 794158,1187 857207,1188 91377,1189 719661,1190 354510,1191 574644,1192 27360,1193 593921,1194 986225,1195 853563,1196 316345,1197 584884,1198 466467,1199 823428,1200 9803,