猜数字游戏

Puzzle:
  CEI
  *DA
-----
  GCH
+DFB 
-----
 ADFH

====step 1=====
D - 1 <= C * D <= D 
~> C=1

  1EI
  *DA
-----
  G1H
+DFB 
-----
 ADFH

====step 2=====
D * E < 10
D + 1 = A != E
D > 1, E > 1
~> (D,E) in [(3,2),(2,4),(4,2)]
test(3,2) pass
test(2,3) fail
test(4,2) fail
~>
  12I
  *34
-----
  G1H
+3FB 
-----
 43FH
====step 3=====
check the rest symbols
~>

  129
  *34
-----
  516
+387 
-----
 4386

A=4
B=7
C=1
D=3
E=2
F=8
G=5
H=6
I=9

 

posted @ 2018-03-27 23:14  rainforwind  阅读(109)  评论(0编辑  收藏  举报