Full completed project

This commit is contained in:
2025-02-10 12:37:33 +00:00
commit b9abff8012
229 changed files with 16866 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# include<string.h>
# include<string>
# include<cmath>
typedef long long int Lint;
extern "C" Lint hash(char* str) {
Lint m = std::pow(10,7) + 7;
int p = 97;
Lint total = 0;
for (int i=0; i<strlen(str); i++) {
total += (int(str[i]) - 32) * pow(p,i);
}
Lint result = total % m;
return result;
}
extern "C" Lint printc(char* str) {
int num = strlen(str);
return num;
}