One test case not passing

Why I cant pass one remaining test case?
What am I missing??

hey @utsavjn48 please share your code through ide.codingblocks.com

@utsavjn48 if p == 1 you need to print 366, please add that case other than that everything is correct.