CR0 - Editorial


Author: Jaymeet Mehta

Tester: Vatsal Parmar

Editorialist: Mann Mehta




Basic Math


There are total N paper's out of which X are already checked and there are total K crew members to check the paper's. how sholud we divide the paper among us such that all get same no. of paper with minimum possibility. Condition Given that :- N and X are in multiple of K.


There are total N question paper, hence out of this X already check then remaining paper are N-X.

Now we have to divide this remaining paper among K crew members such that all of them got equal no. of papers.

As we know if:
X = C1 × K
N = C2 × K
where C1 and C2 are positive constant’s.

Now, to divide the paper among crew equally is the only possible way -> (N-X)/K.
Hence X and N are multiple of K then N-X is also multiple of K, implies this division is always come out to be floor value.


Time Complexity is O(1) per test case.


Editorialist Solution