Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- public class Main {
- public static void main(String[] args) {
- get_variant(7, 6, 19, 724);
- }
- public static void get_variant(int x, int y, int z, int weight) {
- Random random = new Randomget_random_seed(x, y, z));
- int output = Math.abs((int)random.nextLong()) % weight;
- System.out.println(output);
- }
- public static long get_random_seed(int x, int y, int z) {
- long long4 = (long)(x * 3129871) ^ z * 116129781L ^ (long)y;
- long4 = long4 * long4 * 42317861L + long4 * 11L;
- return long4 >> 16;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement