```cpp↵
int n;↵
cin>>n;↵
if (n==0)//deal with it↵
for (double i=0;i<=1/(double)n;i+=1e-9)//do something↵
```↵
↵
It seems that, this code runs faster when $n$ becomes larger...↵
↵
When $n=10^9$, the code will be executed once. When $n=1$, it runs $10^9$ times.↵
↵
So I estimated it as $O(n^{-1})$.↵
↵
But, this means that this algorithm runs even faster than $O(1)$.↵
↵
How is it possible?
int n;↵
cin>>n;↵
if (n==0)//deal with it↵
for (double i=0;i<=1/(double)n;i+=1e-9)//do something↵
```↵
↵
It seems that, this code runs faster when $n$ becomes larger...↵
↵
When $n=10^9$, the code will be executed once. When $n=1$, it runs $10^9$ times.↵
↵
So I estimated it as $O(n^{-1})$.↵
↵
But, this means that this algorithm runs even faster than $O(1)$.↵
↵
How is it possible?