Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
Coding challenge: arrange numbers to form the largest possible integerList of 50 positive integers (0 to 255): [26, 2, 246, 241, 107, 92, 215, 173, 119, 176, 156, 235, 125, 165, 129, 13, 19, 74, 227, 81, 248, 159, 102, 180, 90, 63, 123, 232, 217, 133, 224, 219, 98, 57, 95, 179, 245, 140, 151, 68, 254, 250, 117, 203, 9, 52, 222, 34, 41, 11] Max integer = 254 Most number of digits = 3 Dictionary = {129: 129, 2: 299, 107: 107, 133: 133, 9: 999, 11: 110, 140: 140, 13: 130, 19: 190, 151: 151, 26: 260, 156: 156, 159: 159, 34: 340, 165: 165, 41: 410, 173: 173, 176: 176, 179: 179, 180: 180, 57: 570, 117: 117, 52: 520, 68: 680, 74: 740, 203: 203, 81: 810, 215: 215, 217: 217, 90: 900, 219: 219, 92: 920, 222: 222, 95: 950, 224: 224, 98: 980, 227: 227, 102: 102, 232: 232, 63: 630, 235: 235, 241: 241, 245: 245, 246: 246, 119: 119, 248: 248, 250: 250, 123: 123, 125: 125, 254: 254} Sorted integer list to form the largest integer = [9, 98, 95, 92, 90, 81, 74, 68, 63, 57, 52, 41, 34, 2, 26, 254, 250, 248, 246, 245, 241, 235, 232, 227, 224, 222, 219, 217, 215, 203, 19, 180, 179, 176, 173, 165, 159, 156, 151, 140, 133, 13, 129, 125, 123, 119, 117, 11, 107, 102] The largest integer is 9989592908174686357524134226254250248246245241235232227224222219217215203191801791761731651591561511401331312912512311911711107102 |
λ
.NET NoSQL database for rapid development
|