Guest User

Untitled

a guest
Dec 11th, 2019
101
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main(){
  2. bool f = 1; int sum = 1;
  3. for (int i = 3; i< 1000000; i += 2) {
  4. f = 1;
  5. int z=sqrt(i) ;
  6. for (int j = 3; j <= z; j += 2) {
  7. if (i % j == 0 &&i != j) {
  8. f = 0;
  9. break;
  10. }
  11. }
  12. if (f == 1) {
  13. sum++;
  14. }
  15. }
  16.  
  17. printf("%d",sum);
  18. }
  19.  
  20.  
  21. Each sample counts as 0.01 seconds.
  22. % cumulative self self total
  23. time seconds seconds calls Ts/call Ts/call name
  24. 100.60 0.28 0.28 _fini
  25.  
  26. Call graph (explanation follows)
  27.  
  28.  
  29. granularity: each sample hit covers 2 byte(s) for 3.55% of 0.28 seconds
  30.  
  31. index % time self children called name
  32. 1000000 _fini [1]
  33. [1] 100.0 0.28 0.00 0+1000000 _fini [1]
  34. 1000000 _fini [1]
  35. -----------------------------------------------
RAW Paste Data