first, second and third.
First, each number is written with exactly four digits, padding it with zeros on the left if needed (75 becomes 0075, for example). Then, for each of the four positions, the code takes the smallest of the three digits found at that position.
Return the resulting code as a plain integer, that is, without leading zeros.first=4821, second=5317, third=6902 → 4301
Position by position: min(4, 5, 6) = 4, min(8, 3, 9) = 3, min(2, 1, 0) = 0, min(1, 7, 2) = 1. The code is 4301.
first=75, second=3000, third=468 → 0
Padded with zeros they read 0075, 3000 and 0468. The first two positions give 0, the third gives min(7, 0, 6) = 0, the fourth min(5, 0, 8) = 0. That is 0000, so the answer is 0.
first=999, second=919, third=991 → 911
first, second, third ≤ 9999first=4821, second=5317, third=6902
4301
Run checks the first 3 tests in your browser. Submit checks all 99 tests on the server, hidden ones included.