Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static int getSeed(String string) {
- double seed = 0;
- char[] chars = string.toCharArray();
- for (int i = 0; i < chars.length; i++) {
- int c = (int) chars[i];
- seed += c + (c / (i + 1));
- }
- if (seed < 500) {
- seed *= 1.75;
- }
- return (int) seed;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement