 # How Many Operations Can be Done in 2 Sec and 3 Sec

Hey Guys,
As we all know there can be 10^8 operations can be done in 1 sec In Most of the Online ide , But when the time period is increased to 2 sec or 3 sec , then whats the number of operations??
i asked this questions to many peoples some says
for 2 sec the operations are 10^16 and
Some of them says there can be 2(10^5) Operations*

I always get totally confused when i try to figure out how Operations Can be Done in 2 Sec and 3 Sec. Suppose there is an questions on which time limit is 3 Sec so how many operations can be done???
Can anyone Please explain how many can be done with small explanations???  #Happy Coding

A time limit of > 1 second is usually kept to handle the heavy operations like set insertions , modulus operator ,etc. that are required to be used to solve the problem.
However this doesn’t mean a higher complexity program / greater number of operations would lead to AC.

Moreover you can’t say that 10^8 instructions would run in 1 second as it varies from instruction to instruction.eg., add instruction is a lot faster than the modulus operation.

PS : I want to make it clear that if 10^8 instructions execute in 1 second , then 10^16 instructions would take 10^16 / 10^8 = 10^8 seconds = 10^8/(24 * 60 * 60) days to execute , so don’t get the wrong idea that a time limit of > 1 second can accept a non optimal solution.

6 Likes

1s → 10^8 s
2s → 2(10^8 )s
3s → 3( 10^8)s
10s—> 10^9s
i think now u got this that 2s does not mean 10^16 (i.e, doubling the power or squaring the operations ) but it doubles number of operations or we can say n secs just get multiply 10^8*n