Unable to pass test case 0,1,4

link to my code is https://ide.codingblocks.com/s/213708

@jatin111
There are two issues with your code:

The range of variables is smaller than required
N can be 10^9,
You need a datatype of larger range than int for storing c.
Modification:
long

Your code will print junk values of c and b for the cases when a is 1 or 2.

Hope, this would help.
please mark it as resolved if you are satisfied with the answer