Please tell me what is error in my code this is code of painter partition problem

I write code for time =1 unit in genral

hello @kailash_01 it is fine if you are writing this for unit time as you can just multiply the final answer by the time given .
i will see your code and i will tell you .

this code is not accepting all tc in hackerblock

@kailash_01 i have made correction and now it is passing every test case .


if you feel your doubt is cleared please mark this as resolved.
Happy Learning !!

it stil not accepting all tc but on hackerblock question this is question->https://hack.codingblocks.com/app/practice/1/1057/problem and this is my code->https://ide.codingblocks.com/s/338917

the doubt on which you have raised the question and the question on hackerblocks are not same .
the question on hackerblocks says that every painter takes only unit of time to paint whereas the question in oyur portal says that every painter paints in t units of time .
in your portal question you have to manipulate your answer by multiplying it by t units if time but not in hackerblocks question ,in that you have to output the same calculated .
thats why it is not passing test cases on hackerblocks .
i hope i have cleared your doubt .
if you are satisfied please mark this as resolved .
Happy Learning!!

You are not able to understand my doubt please understand ,my doubt is in hackerblock question of this–>https://hack.codingblocks.com/app/practice/1/1057/problem i write code but not accepting all tc this is my code -->https://ide.codingblocks.com/s/339253 please help me i …

@kailash_01 have you seen the input format of the question .
.in main why are you doing the t-- when it is not demanding for the test cases .
and you have to change the input format i.e first you have to change your input format like you are taking n as input before k whereas you have to take k as input first and then n .
please make these changes and then also if the code does not passes the test cases please reply here .
we will further discuss.
Happy Learning !!

Thanku so much for finding my silly mistake i got :slight_smile:

If you feel your doubt is cleared please mark this as resolved.
On off the chance if you still have doubt you can reopen it .