//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f. pragma solidity ^0.4.18; contract SimpleStore { uint256 baseValue = (10 ** 18); uint profitPercentage = 20; uint[] list = [1,2,3,4,5,6,7]; function toString(uint256 value) private pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } function get() public pure returns (uint) { return bytes(toString(~uint256(0))).length; } function get2() public pure returns (uint) { return bytes(toString((200000 * 10 ** 18) * (10 ** 18))).length; } function get3() public view returns (uint256) { uint256 percentageValue = (((100 + profitPercentage) * baseValue)/ 100); uint256 amountToken = 20 * baseValue; return ((percentageValue * amountToken) / baseValue); } function get4() public view returns (uint256) { uint256 percentageValue = (((100 + profitPercentage) * baseValue)/ 100); uint256 amountToken = 20 * baseValue; return bytes(toString(((percentageValue * amountToken) / baseValue))).length; } function get5() public view returns (uint256) { uint256 percentageValue = (((100 - profitPercentage) * baseValue)/ 100); uint256 amountToken = 20 * baseValue; return ((percentageValue * amountToken) / baseValue); } function get6() public view returns (uint256) { uint256 percentageValue = (((100 - profitPercentage) * baseValue)/ 100); uint256 amountToken = 20 * baseValue; return bytes(toString(((percentageValue * amountToken) / baseValue))).length; } function get7() public view returns (uint) { return list.length; } }
0.4.18