88888
意外なことに88888 が見つからなかった。
(1..9).to_a.permutation{|i|
a, b = i[0..4].join.to_i, i[5..-1].join.to_i
if (a - b) % 11111 == 0
puts "#{a} - #{b} = #{a - b}"
elsif (a + b) % 11111 == 0
puts "#{a} + #{b} = #{a + b}"
end
}
出力結果
13579 - 2468 = 11111
13597 - 2486 = 11111
13759 - 2648 = 11111
13795 - 2684 = 11111
13957 - 2846 = 11111
13975 - 2864 = 11111
15379 - 4268 = 11111
15397 - 4286 = 11111
15739 - 4628 = 11111
15793 - 4682 = 11111
15937 - 4826 = 11111
15973 - 4862 = 11111
17359 - 6248 = 11111
17395 - 6284 = 11111
17539 - 6428 = 11111
17593 - 6482 = 11111
17935 - 6824 = 11111
17953 - 6842 = 11111
19357 - 8246 = 11111
19375 - 8264 = 11111
19537 - 8426 = 11111
19573 - 8462 = 11111
19735 - 8624 = 11111
19753 - 8642 = 11111
25718 - 3496 = 22222
25871 - 3649 = 22222
27158 - 4936 = 22222
27185 - 4963 = 22222
28571 - 6349 = 22222
28715 - 6493 = 22222
31478 - 9256 = 22222
31487 - 9265 = 22222
31748 - 9526 = 22222
31784 - 9562 = 22222
31847 - 9625 = 22222
31874 - 9652 = 22222
41268 - 7935 = 33333
41286 - 7953 = 33333
46279 - 1835 = 44444
46297 - 1853 = 44444
46819 - 2375 = 44444
46981 - 2537 = 44444
47629 - 3185 = 44444
47962 - 3518 = 44444
48169 - 3725 = 44444
48196 - 3752 = 44444
49627 - 5183 = 44444
49681 - 5237 = 44444
49762 - 5318 = 44444
49816 - 5372 = 44444
51238 - 6794 = 44444
51427 - 6983 = 44444
52138 - 7694 = 44444
53416 - 8972 = 44444
54127 - 9683 = 44444
54316 - 9872 = 44444
56789 - 1234 = 55555
56798 - 1243 = 55555
56834 - 1279 = 55555
56879 - 1324 = 55555
56897 - 1342 = 55555
56942 - 1387 = 55555
56978 - 1423 = 55555
56987 - 1432 = 55555
57239 - 1684 = 55555
57248 - 1693 = 55555
57689 - 2134 = 55555
57698 - 2143 = 55555
57869 - 2314 = 55555
57896 - 2341 = 55555
57941 - 2386 = 55555
57968 - 2413 = 55555
57986 - 2431 = 55555
58319 - 2764 = 55555
58346 - 2791 = 55555
58679 - 3124 = 55555
58697 - 3142 = 55555
58724 - 3169 = 55555
58769 - 3214 = 55555
58796 - 3241 = 55555
58967 - 3412 = 55555
58976 - 3421 = 55555
59417 - 3862 = 55555
59426 - 3871 = 55555
59678 - 4123 = 55555
59687 - 4132 = 55555
59723 - 4168 = 55555
59768 - 4213 = 55555
59786 - 4231 = 55555
59831 - 4276 = 55555
59867 - 4312 = 55555
59876 - 4321 = 55555
61289 - 5734 = 55555
61298 - 5743 = 55555
61379 - 5824 = 55555
61397 - 5842 = 55555
61478 - 5923 = 55555
61487 - 5932 = 55555
69153 - 2487 = 66666
69513 - 2847 = 66666
71358 - 4692 = 66666
71529 - 4863 = 66666
71934 - 5268 = 66666
73158 - 6492 = 66666
73194 - 6528 = 66666
73491 - 6825 = 66666
74931 - 8265 = 66666
75129 - 8463 = 66666
81256 - 3479 = 77777
81472 - 3695 = 77777
81526 - 3749 = 77777
81742 - 3965 = 77777
82156 - 4379 = 77777
82516 - 4739 = 77777
84172 - 6395 = 77777
84712 - 6935 = 77777
85126 - 7349 = 77777
85216 - 7439 = 77777
87142 - 9365 = 77777
87412 - 9635 = 77777
91234 + 8765 = 99999
91235 + 8764 = 99999
91243 + 8756 = 99999
91246 + 8753 = 99999
91253 + 8746 = 99999
91256 + 8743 = 99999
91264 + 8735 = 99999
91265 + 8734 = 99999
91324 + 8675 = 99999
91325 + 8674 = 99999
91342 + 8657 = 99999
91347 + 8652 = 99999
91352 + 8647 = 99999
91357 + 8642 = 99999
91374 + 8625 = 99999
91375 + 8624 = 99999
91423 + 8576 = 99999
91426 + 8573 = 99999
91432 + 8567 = 99999
91437 + 8562 = 99999
91462 + 8537 = 99999
91467 + 8532 = 99999
91473 + 8526 = 99999
91476 + 8523 = 99999
91523 + 8476 = 99999
91526 + 8473 = 99999
91532 + 8467 = 99999
91537 + 8462 = 99999
91562 + 8437 = 99999
91567 + 8432 = 99999
91573 + 8426 = 99999
91576 + 8423 = 99999
91624 + 8375 = 99999
91625 + 8374 = 99999
91642 + 8357 = 99999
91647 + 8352 = 99999
91652 + 8347 = 99999
91657 + 8342 = 99999
91674 + 8325 = 99999
91675 + 8324 = 99999
91734 + 8265 = 99999
91735 + 8264 = 99999
91743 + 8256 = 99999
91746 + 8253 = 99999
91753 + 8246 = 99999
91756 + 8243 = 99999
91764 + 8235 = 99999
91765 + 8234 = 99999
92134 + 7865 = 99999
92135 + 7864 = 99999
92143 + 7856 = 99999
92146 + 7853 = 99999
92153 + 7846 = 99999
92156 + 7843 = 99999
92164 + 7835 = 99999
92165 + 7834 = 99999
92314 + 7685 = 99999
92315 + 7684 = 99999
92341 + 7658 = 99999
92348 + 7651 = 99999
92351 + 7648 = 99999
92358 + 7641 = 99999
92384 + 7615 = 99999
92385 + 7614 = 99999
92413 + 7586 = 99999
92416 + 7583 = 99999
92431 + 7568 = 99999
92438 + 7561 = 99999
92461 + 7538 = 99999
92468 + 7531 = 99999
92483 + 7516 = 99999
92486 + 7513 = 99999
92513 + 7486 = 99999
92516 + 7483 = 99999
92531 + 7468 = 99999
92538 + 7461 = 99999
92561 + 7438 = 99999
92568 + 7431 = 99999
92583 + 7416 = 99999
92586 + 7413 = 99999
92614 + 7385 = 99999
92615 + 7384 = 99999
92641 + 7358 = 99999
92648 + 7351 = 99999
92651 + 7348 = 99999
92658 + 7341 = 99999
92684 + 7315 = 99999
92685 + 7314 = 99999
92834 + 7165 = 99999
92835 + 7164 = 99999
92843 + 7156 = 99999
92846 + 7153 = 99999
92853 + 7146 = 99999
92856 + 7143 = 99999
92864 + 7135 = 99999
92865 + 7134 = 99999
93124 + 6875 = 99999
93125 + 6874 = 99999
93142 + 6857 = 99999
93147 + 6852 = 99999
93152 + 6847 = 99999
93157 + 6842 = 99999
93174 + 6825 = 99999
93175 + 6824 = 99999
93214 + 6785 = 99999
93215 + 6784 = 99999
93241 + 6758 = 99999
93248 + 6751 = 99999
93251 + 6748 = 99999
93258 + 6741 = 99999
93284 + 6715 = 99999
93285 + 6714 = 99999
93412 + 6587 = 99999
93417 + 6582 = 99999
93421 + 6578 = 99999
93428 + 6571 = 99999
93471 + 6528 = 99999
93478 + 6521 = 99999
93482 + 6517 = 99999
93487 + 6512 = 99999
93512 + 6487 = 99999
93517 + 6482 = 99999
93521 + 6478 = 99999
93528 + 6471 = 99999
93571 + 6428 = 99999
93578 + 6421 = 99999
93582 + 6417 = 99999
93587 + 6412 = 99999
93714 + 6285 = 99999
93715 + 6284 = 99999
93741 + 6258 = 99999
93748 + 6251 = 99999
93751 + 6248 = 99999
93758 + 6241 = 99999
93784 + 6215 = 99999
93785 + 6214 = 99999
93824 + 6175 = 99999
93825 + 6174 = 99999
93842 + 6157 = 99999
93847 + 6152 = 99999
93852 + 6147 = 99999
93857 + 6142 = 99999
93874 + 6125 = 99999
93875 + 6124 = 99999
94123 + 5876 = 99999
94126 + 5873 = 99999
94132 + 5867 = 99999
94137 + 5862 = 99999
94162 + 5837 = 99999
94167 + 5832 = 99999
94173 + 5826 = 99999
94176 + 5823 = 99999
94213 + 5786 = 99999
94216 + 5783 = 99999
94231 + 5768 = 99999
94238 + 5761 = 99999
94261 + 5738 = 99999
94268 + 5731 = 99999
94283 + 5716 = 99999
94286 + 5713 = 99999
94312 + 5687 = 99999
94317 + 5682 = 99999
94321 + 5678 = 99999
94328 + 5671 = 99999
94371 + 5628 = 99999
94378 + 5621 = 99999
94382 + 5617 = 99999
94387 + 5612 = 99999
94612 + 5387 = 99999
94617 + 5382 = 99999
94621 + 5378 = 99999
94628 + 5371 = 99999
94671 + 5328 = 99999
94678 + 5321 = 99999
94682 + 5317 = 99999
94687 + 5312 = 99999
94713 + 5286 = 99999
94716 + 5283 = 99999
94731 + 5268 = 99999
94738 + 5261 = 99999
94761 + 5238 = 99999
94768 + 5231 = 99999
94783 + 5216 = 99999
94786 + 5213 = 99999
94823 + 5176 = 99999
94826 + 5173 = 99999
94832 + 5167 = 99999
94837 + 5162 = 99999
94862 + 5137 = 99999
94867 + 5132 = 99999
94873 + 5126 = 99999
94876 + 5123 = 99999
95123 + 4876 = 99999
95126 + 4873 = 99999
95132 + 4867 = 99999
95137 + 4862 = 99999
95162 + 4837 = 99999
95167 + 4832 = 99999
95173 + 4826 = 99999
95176 + 4823 = 99999
95213 + 4786 = 99999
95216 + 4783 = 99999
95231 + 4768 = 99999
95238 + 4761 = 99999
95261 + 4738 = 99999
95268 + 4731 = 99999
95283 + 4716 = 99999
95286 + 4713 = 99999
95312 + 4687 = 99999
95317 + 4682 = 99999
95321 + 4678 = 99999
95328 + 4671 = 99999
95371 + 4628 = 99999
95378 + 4621 = 99999
95382 + 4617 = 99999
95387 + 4612 = 99999
95612 + 4387 = 99999
95617 + 4382 = 99999
95621 + 4378 = 99999
95628 + 4371 = 99999
95671 + 4328 = 99999
95678 + 4321 = 99999
95682 + 4317 = 99999
95687 + 4312 = 99999
95713 + 4286 = 99999
95716 + 4283 = 99999
95731 + 4268 = 99999
95738 + 4261 = 99999
95761 + 4238 = 99999
95768 + 4231 = 99999
95783 + 4216 = 99999
95786 + 4213 = 99999
95823 + 4176 = 99999
95826 + 4173 = 99999
95832 + 4167 = 99999
95837 + 4162 = 99999
95862 + 4137 = 99999
95867 + 4132 = 99999
95873 + 4126 = 99999
95876 + 4123 = 99999
96124 + 3875 = 99999
96125 + 3874 = 99999
96142 + 3857 = 99999
96147 + 3852 = 99999
96152 + 3847 = 99999
96157 + 3842 = 99999
96174 + 3825 = 99999
96175 + 3824 = 99999
96214 + 3785 = 99999
96215 + 3784 = 99999
96241 + 3758 = 99999
96248 + 3751 = 99999
96251 + 3748 = 99999
96258 + 3741 = 99999
96284 + 3715 = 99999
96285 + 3714 = 99999
96412 + 3587 = 99999
96417 + 3582 = 99999
96421 + 3578 = 99999
96428 + 3571 = 99999
96471 + 3528 = 99999
96478 + 3521 = 99999
96482 + 3517 = 99999
96487 + 3512 = 99999
96512 + 3487 = 99999
96517 + 3482 = 99999
96521 + 3478 = 99999
96528 + 3471 = 99999
96571 + 3428 = 99999
96578 + 3421 = 99999
96582 + 3417 = 99999
96587 + 3412 = 99999
96714 + 3285 = 99999
96715 + 3284 = 99999
96741 + 3258 = 99999
96748 + 3251 = 99999
96751 + 3248 = 99999
96758 + 3241 = 99999
96784 + 3215 = 99999
96785 + 3214 = 99999
96824 + 3175 = 99999
96825 + 3174 = 99999
96842 + 3157 = 99999
96847 + 3152 = 99999
96852 + 3147 = 99999
96857 + 3142 = 99999
96874 + 3125 = 99999
96875 + 3124 = 99999
97134 + 2865 = 99999
97135 + 2864 = 99999
97143 + 2856 = 99999
97146 + 2853 = 99999
97153 + 2846 = 99999
97156 + 2843 = 99999
97164 + 2835 = 99999
97165 + 2834 = 99999
97314 + 2685 = 99999
97315 + 2684 = 99999
97341 + 2658 = 99999
97348 + 2651 = 99999
97351 + 2648 = 99999
97358 + 2641 = 99999
97384 + 2615 = 99999
97385 + 2614 = 99999
97413 + 2586 = 99999
97416 + 2583 = 99999
97431 + 2568 = 99999
97438 + 2561 = 99999
97461 + 2538 = 99999
97468 + 2531 = 99999
97483 + 2516 = 99999
97486 + 2513 = 99999
97513 + 2486 = 99999
97516 + 2483 = 99999
97531 + 2468 = 99999
97538 + 2461 = 99999
97561 + 2438 = 99999
97568 + 2431 = 99999
97583 + 2416 = 99999
97586 + 2413 = 99999
97614 + 2385 = 99999
97615 + 2384 = 99999
97641 + 2358 = 99999
97648 + 2351 = 99999
97651 + 2348 = 99999
97658 + 2341 = 99999
97684 + 2315 = 99999
97685 + 2314 = 99999
97834 + 2165 = 99999
97835 + 2164 = 99999
97843 + 2156 = 99999
97846 + 2153 = 99999
97853 + 2146 = 99999
97856 + 2143 = 99999
97864 + 2135 = 99999
97865 + 2134 = 99999
98234 + 1765 = 99999
98235 + 1764 = 99999
98243 + 1756 = 99999
98246 + 1753 = 99999
98253 + 1746 = 99999
98256 + 1743 = 99999
98264 + 1735 = 99999
98265 + 1734 = 99999
98324 + 1675 = 99999
98325 + 1674 = 99999
98342 + 1657 = 99999
98347 + 1652 = 99999
98352 + 1647 = 99999
98357 + 1642 = 99999
98374 + 1625 = 99999
98375 + 1624 = 99999
98423 + 1576 = 99999
98426 + 1573 = 99999
98432 + 1567 = 99999
98437 + 1562 = 99999
98462 + 1537 = 99999
98467 + 1532 = 99999
98473 + 1526 = 99999
98476 + 1523 = 99999
98523 + 1476 = 99999
98526 + 1473 = 99999
98532 + 1467 = 99999
98537 + 1462 = 99999
98562 + 1437 = 99999
98567 + 1432 = 99999
98573 + 1426 = 99999
98576 + 1423 = 99999
98624 + 1375 = 99999
98625 + 1374 = 99999
98642 + 1357 = 99999
98647 + 1352 = 99999
98652 + 1347 = 99999
98657 + 1342 = 99999
98674 + 1325 = 99999
98675 + 1324 = 99999
98734 + 1265 = 99999
98735 + 1264 = 99999
98743 + 1256 = 99999
98746 + 1253 = 99999
98753 + 1246 = 99999
98756 + 1243 = 99999
98764 + 1235 = 99999
98765 + 1234 = 99999
0 件のコメント:
コメントを投稿
注: コメントを投稿できるのは、このブログのメンバーだけです。