Did you find that in the link(codechef...) the input/output do not conform with the goal of the problem? Input ` 3 3 ` , Should have the output 0 1 2 , but they gave just 2
Solutions. Define alpha = greatest integer [k/(n-1)] Run a for loop from i = 1 to alpha Fill all the numbers between (i-1) * (k+n-1) to i * k All these numbers are not possible to cover
@Mann I wasn't in my place at that time. But alpha = ceil((k-1)/(n-1)) and alpha = floor(k/(n-1)) produces the same output. For you help: Floor() = GIF, ceil() = LIF
@cattt It is not clear to me what your algorithm is. There are too many variables and I never worked with that library which you've included. You can have 8 line of simple code, rather than 50 lines of code that uses modular arithmetic. I guess, that hurts your originality(assuming you come with your code yourself) but sometimes a tradeoff can be rationalized.
But why are using such huge numbers? program time limit is 1 sec[ Although useless don't consider whether I am on simple phone or using cloud to compute stuff]
Hello, koi mujhe please yeh batao ki counselling ke wakt first round ke baad reporting karna hota hai usme hume date milti hai kya kis din report karna hai ya 5 din mei kabhi bhi ja skte hai?