Solving Multiple of 3 for more than 30 hours please help

I am solving (Multiple of 3)[CodeChef: Practical coding for everyone] from the data series for more than 30 hours, please help me, I am getting the wrong answer, but all the given test cases are passing.
(my code ) [https://gist.github.com/phoenix30s/b4f50fa4b1534dba6876d34470372a9d]
I will appreciate any help.

i have watched the youtube video since i almost copyied each and ever line and try to compute still i didn’t get AC i am really frustrated by this question i also posted about my code still no one give there time to find bugs please help beginners as they are new to coding its a request from a noob(me) to entire coding community please help us to grow as well
@admin please help us

finally my code is working you can check the link.