You pay 64 + 32 + 16 + 8 + 4 + 2 + 1 as outputs. The outputs are enabled/disabled based on the diff value. This would require division and also binary operators.
Output 0: 1.28: If (D & 128) then pay Alice otherwise Bob
Output 0: 0.64: If (D & 64) then pay Alice otherwise Bob
Output 0: 0.32: If (D & 32) then pay Alice otherwise Bob
Output 0: 0.16: If (D & 16) then pay Alice otherwise Bob
Output 0: 0.8: If (D & 8) then pay Alice otherwise Bob
Output 0: 0.4: If (D & 4) then pay Alice otherwise Bob
Output 0: 0.4: If (D & 4) then pay Alice otherwise Bob
Output 0: 0.4: If (D & 4) then pay Alice otherwise Bob
This has log performance in terms of the number of ticks like the MAST solution.