SHARE
TWEET

Untitled

a guest Dec 31st, 2014 163 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;;
  5.  
  6. int main ()
  7. {
  8. double nf=0;
  9. double time=0;
  10. double times = 0;
  11. long double prime=1483411773;
  12. double aseed=419951771;
  13. double bseed=738215167;
  14. double c=1104076847;
  15. double d=945888697;
  16. double a=0;
  17. double b=0;
  18.  
  19. cout << "Combien de lancers avez-vous deja fait ?" << endl;
  20. cin >> times;
  21. a=fmod((b*times+aseed),prime);
  22. b=fmod((d*times+bseed),prime);
  23. cout << "Combien de faces sur le de ?" << endl;
  24. cin >> nf;
  25. cout << "Donnez votre timestamp"<<endl;
  26. cin >> time;
  27. cout << "Vous avez obtenu un " << 1+fmod(fmod((a*time+b),prime),nf)<< endl;
  28.     return 0;
  29. }
RAW Paste Data
Top