Created
March 5, 2013 00:47
-
-
Save taishi41228/5087083 to your computer and use it in GitHub Desktop.
よく使う関数 ref: http://qiita.com/items/20e902bc5b79ff724cee
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
int factorial(int n){ | |
if(n == 1){ | |
return 1; | |
} | |
return n * factorial(n-1); | |
} |
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
int hash(int x,int n){ | |
return x % n; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment