2230
3896
There is no four digit number where the ones is twice the tens, the hundreds is five less than the ones, and the thousands is the sum of the tens and hundreds. int ones, tens, hundreds, thousands; for (thousands=1; thousands<10; thousands++) { /**/ for (hundreds=0; hundreds<10; hundreds++) { /**/ /**/ for (tens=0; tens<10; tens++) { /**/ /**/ /**/ for (ones=0; ones<10; ones++) { /**/ /**/ /**/ /**/ if (ones != 2 * tens) break; /**/ /**/ /**/ /**/ if (hundreds != ones - 5) break; /**/ /**/ /**/ /**/ if (thousands != tens + hundreds) break; /**/ /**/ /**/ /**/ printf ("dd\n", thousands, hundreds, tens, ones); /**/ /**/ /**/ } /**/ /**/ } /**/ } }
6,130 has.
4117
It is 4692.
The number is 1193.
3896
There is no four digit number where the ones is twice the tens, the hundreds is five less than the ones, and the thousands is the sum of the tens and hundreds. int ones, tens, hundreds, thousands; for (thousands=1; thousands<10; thousands++) { /**/ for (hundreds=0; hundreds<10; hundreds++) { /**/ /**/ for (tens=0; tens<10; tens++) { /**/ /**/ /**/ for (ones=0; ones<10; ones++) { /**/ /**/ /**/ /**/ if (ones != 2 * tens) break; /**/ /**/ /**/ /**/ if (hundreds != ones - 5) break; /**/ /**/ /**/ /**/ if (thousands != tens + hundreds) break; /**/ /**/ /**/ /**/ printf ("dd\n", thousands, hundreds, tens, ones); /**/ /**/ /**/ } /**/ /**/ } /**/ } }
6,130 has.
The smallest such number is 2499.
4117
7252
It is 4692.
Having: 9 ten-thousands → 90,000 the same number of thousands as ten thousands → 9 ten-thousands: 9 thousands → 9,000 8 fewer hundreds than ten-thousands → 9 ten-thousand: 9 - 8 = 1 hundreds → 100 6 more tens than hundreds → 1 hundreds: 1 + 6 = 7 tens → 70 6 fewer ones than thousands → 9 thousands: 9 - 6 = 3 ones → 3 → the number is 90,000 + 9,000 + 100 + 70 + 3 = 99,173.
2 thousands: 2 × 1000 - 2,000 1 fewer hundreds than thousands: 2 - 1 = 1 hundred: 1 × 100 = 100 4 more tens than hundreds: 1 + 4 = 5 tens: 5 × 10 = 50 same number of ones as thousands: 2 ones: 2 × 1 = 2 → the number is 2000 + 100 + 50 + 2 = 2152.
The number is 8,413
Oh, dude, let me break it down for you. So, we've got 8 ten thousands (80,000), no thousands, 3 fewer hundreds than ten thousands (800 - 3 = 797), 5 more tens than thousands (70 + 5 = 75), and 2 more ones than hundreds (7 + 2 = 9). Put it all together, and you get the number 80,797. Easy peasy!