im not able to approach how to start writing code for this

My code

# Step 1: Read and understand the problem statement and sample test cases
# Click on 'Next' once you are ready to proceed.
t=int(input())
for i in range(t):
score=int(input())
R=0
if score%3==0:
R=R+score

For every correct answer you get +3 so every time you answer correctly your answer stays a multiple of 3 however if you get one wrong answer your answer becomes 1 less than a multiple of 3 and if you get 2 wrong answer your answer becomes 2 less than multiple of 3 and for 3 wrong answer your answer again becomes a multiple of 3 which can also happen if you perform 1 less correct answer and no wrong answer so the minimum number of incorrect answer depends on how much is the given number is less than the next multiple of 3. For ex: 5 is 1 less than 6(multiple of 3) so it has 1 incorrect answer and 4 is 2 less than 6(multiple of 3) so it has 2 incorrect answer.