pragma solidity ^0.5.8 ;
import "./SafeMath.sol";
contract dropping{
using SafeMath for uint;
mapping(uint256 => address) public NoToAddr;
mapping(address => uint256) public AddTomount;
mapping(address => uint256) public AddToDrop;
uint256 public total;
function testfor(address t1, address t2, address t3, uint256 mount_)public returns(uint256,uint256,uint256){
NoToAddr[0] = t1;
NoToAddr[1] = t2;
NoToAddr[2] = t3;
AddTomount[t1] = 10;
AddTomount[t2] = 20;
AddTomount[t3] = 30;
total = 60;
for(uint256 i = 0; i<=2; i++){
AddToDrop[NoToAddr[i]] += (mount_.mul(AddTomount[NoToAddr[i]])).div(total);
}
return(AddToDrop[t1], AddToDrop[t2], AddToDrop[t3]);
}
}
{
"0": "uint256: 300",
"1": "uint256: 1200",
"2": "uint256: 450"
}