>>231のソースを拝借中

9*9*9
value = 729 (これは正しい)

(2*3)+5
value = 0

3*(2+2)
value = 1

3+2
value = 5 (これも正しい)


おかしいのはfactorなのかな…
ちょっと弄ってみるか