let the 12 balls be numbered 1,2,3,4,5,...,12tvb now,tvbnow,bttvb. M7 V8 h: |' w! x5 |
weight 1234 with 56787 Q* k; O7 \7 G) n8 L! n
case 1; N$ D4 j& [! _8 P# U! i
if 1234>5678, then weight 125 with 678: I$ q" d9 Y* i
if 125>678, then weight 1 with 2
6 ?* w; @$ m4 E" Y4 G9 BTVBNOW 含有熱門話題,最新最快電視,軟體,遊戲,電影,動漫及日常生活及興趣交流等資訊。if 1>2 it is 1, if 1=2 it is 5, if 1<2 it is 2tvb now,tvbnow,bttvb; M/ p7 t( N+ I5 F' U' ^' s
if 125=678, then weight 3 with 9
& F. U; p' |- b7 w- g+ w公仔箱論壇if 3=9 it is 4, else it is 3
9 _% H% G, i$ T5 } P1 m2 Eif 125<678, then ewight 3 with 4
6 D j/ G4 i; N5 u3 ], i公仔箱論壇if 3>4 it is 3, if 3=4, it is 5, if 3<4, it is 4
1 W+ c* Z) B, O0 J. @/ U8 L% Ptvb now,tvbnow,bttvb8 |. l$ @ m+ t# y. i
case 2TVBNOW 含有熱門話題,最新最快電視,軟體,遊戲,電影,動漫及日常生活及興趣交流等資訊。% C# o5 M( M2 l9 s, ^, r8 e7 k
repeat above for 5678 instead of 1234 if 1234<5678
6 T u3 s- `" O4 K8 r/ ]9 U! J公仔箱論壇tvb now,tvbnow,bttvb, D& f9 E7 f* ^6 H' e7 h
case 3
) N; e* w( }4 p5 K, `7 v" a公仔箱論壇1234=5678, this case u only have 9 10 11 12 as possible, this is easy enough that i don't need to explain
: r1 L& P" h! u+ i+ y: J& j' C' ?TVBNOW 含有熱門話題,最新最快電視,軟體,遊戲,電影,動漫及日常生活及興趣交流等資訊。
9 N2 x7 f7 P# H. R1 j; O5.39.217.76[ 本帖最後由 l0709394 於 2007-5-8 10:15 AM 編輯 ] |