Nice, thanks! That's good to know. So the "winning number" is already bound to the target account that will be receiving the bounty, so there's no way somebody can cheat and keep the bounty for themselves.
Well it is more complicated and secure than that. A solved block is only good as single specific entity. Change any aspect of the block (timestamp, previous block hash, remove any transactions, add a transaction, etc) then the block will have a new random block hash which will not meet the difficulty target.