contract Distribute {

    address public owner;

    constructor() public {
        owner = msg.sender;
    }

    //批量转账  
    function transferETHS(address[] _tos) payable public returns(bool) {
        require(_tos.length > 0);
        uint val = this.balance / _tos.length;
        for (uint32 i = 0; i < _tos.length; i++) {
            _tos[i].transfer(val);
        }
        return true;
    }

    function () payable public {
        owner.transfer(this.balance);
    }
}
function transferETHS(address[] _tos) payable public returns(bool) {
    require(_tos.length > 0);
    uint val = this.balance / _tos.length;
    for (uint32 i = 0; i < _tos.length; i++) {
        _tos[i].transfer(val);
    }
    return true;
}

//批量转账  