Last active
February 21, 2022 12:30
-
-
Save maymax777/51039d0024ba62acebb9fa441f2c6e0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.19; | |
contract MaximumMultiple { | |
function maxMultiple(int d, int b) public pure returns (int) { | |
// | |
int max = d > b ? d : b; | |
int min = d < b ? d : b; | |
return max - max % min; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment