fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int q = 0;
  6. for (int i=0;i<10000;i++){
  7. int t = rand()%65536;
  8. t-= 32768;
  9. if (t>=0) t++;
  10. if (t > 0) q++;
  11. }
  12. cout<< q << endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
5024