質問編集履歴
1
xが誤植です
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,13 +60,11 @@
|
|
60
60
|
|
61
61
|
{
|
62
62
|
|
63
|
-
int x;
|
64
|
-
|
65
63
|
int num=((long long)1<<31)-1; //2147483647
|
66
64
|
|
67
|
-
//val=((long long)
|
65
|
+
//val=((long long)val*(long long)16807)%2147483647;
|
68
66
|
|
69
|
-
val=((long long)
|
67
|
+
val=((long long)val*(long long)16807)%num;
|
70
68
|
|
71
69
|
return val;
|
72
70
|
|