Skip to content

Instantly share code, notes, and snippets.

@raven38
Created October 6, 2014 14:28
Show Gist options
  • Save raven38/e8af543971376fb08f63 to your computer and use it in GitHub Desktop.
Save raven38/e8af543971376fb08f63 to your computer and use it in GitHub Desktop.
MODをとる計算
// modをとる。nが負数の時に期待する値が返されないのでmを足してからmodをとっている
int mod(int n, int m){
return (n + m) % m;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment