April challenge

Hi All, In April challenge,
problem - SDICE
my solution - solution
Language - c#
task #3 - WA
Its not passing task #3 .
Can anybody tell me where I am wrong.

I think you didn’t write for rem==0.

long res = (int)(N/4) * 4 * 11; shouldn’t it be long res = (long)(N/4) * 4 * 11;?

1 Like

if rem==0 , than first if loop takes care of that, res+=(4- N%4)*4

yeah, It works. thank you very much, actually I start it with int that’s why I forget to change.

Oh, my bad. Thank you!!