How to seperate subtask while coding a problem for specific subtask

How to seperate subtask while coding a problem for specific subtask

1 Like

use if else statements
e.g.
Subtask 1: 1<=N<=10^2
Subtask 2: 1<=N<=10^4
Then
if(N<=100){

}
else{

}

1 Like

Write code that is correct given the conditions under a subtask.
I don’t recommend it, but you could write if(n<=1000) for say solve a subtask with these constrains and then solve it.

you don’t need to…that’s extra info