Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(){
- bool f = 1; int sum = 1;
- for (int i = 3; i< 1000000; i += 2) {
- f = 1;
- int z=sqrt(i) ;
- for (int j = 3; j <= z; j += 2) {
- if (i % j == 0 &&i != j) {
- f = 0;
- break;
- }
- }
- if (f == 1) {
- sum++;
- }
- }
- printf("%d",sum);
- }
- Each sample counts as 0.01 seconds.
- % cumulative self self total
- time seconds seconds calls Ts/call Ts/call name
- 100.60 0.28 0.28 _fini
- Call graph (explanation follows)
- granularity: each sample hit covers 2 byte(s) for 3.55% of 0.28 seconds
- index % time self children called name
- 1000000 _fini [1]
- [1] 100.0 0.28 0.00 0+1000000 _fini [1]
- 1000000 _fini [1]
- -----------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement