fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. cout<<RAND_MAX<<endl;
  7. for(int i=0;i<1000;i++){
  8. int x= rand();
  9. if(x >= 1000){
  10. cout<<x<<endl;
  11. break;
  12. }
  13. }
  14. #define RAND_MAX 1000
  15. for(int i=0;i<1000;i++){
  16. int x= rand();
  17. if(x >= 1000){
  18. cout<<x<<endl;
  19. break;
  20. }
  21. }
  22. return 0;
  23. }
Success #stdin #stdout 0s 4492KB
stdin
Standard input is empty
stdout
2147483647
1804289383
846930886