SHARE
TWEET

4DzNum7

nikitakrut58 Nov 19th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4. #include <cmath>
  5.  
  6. using namespace std;
  7.  
  8. void var1(){
  9.     int S[255];
  10.     S[0]=1;
  11.     int m=37,i=3,c=64;
  12.     cout<<S[0]<<" ";
  13.     for(int n=0;n<i;n++){
  14.         S[n+1]=(m*S[n]+n)%c;
  15.         cout<<S[n+1]<<" ";
  16.     }
  17. }
  18.  
  19. void var2(){
  20.     int S[14000];
  21.     S[0]=1;
  22.     int m=25173,i=13849,c=65537;
  23.     cout<<S[0]<<" ";
  24.     for(int n=0;n<i;n++){
  25.         S[n+1]=(m*S[n]+n)%c;
  26.         cout<<S[n+1]<<" ";
  27.     }
  28. }
  29.  
  30. int main(){
  31.     int var;
  32.     cout<<"var?"<<endl;
  33.     cin>>var;
  34.     if(var==1){
  35.         var1();
  36.     }else{
  37.         var2();
  38.     }
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top