Solutions gives WA on submit, but have no idea what is wrong

Question: Three Boxes - Problems | CodeChef
My solution:

#include <iostream>
#include <cmath>

using namespace std;

int main() {
    int t;
    cin >> t;
    
    while (t--){
        int a, b, c, d;
        cin >> a >> b >> c >> d;
        int sum = (a + b + c);
        if (sum <= d)
            cout << 1 << "\n";
        else if (sum % d == 0)
            cout << (int)(sum/d) << "\n";
        else
            cout << (int)((sum/d) + 1) << "\n";
    }
    
	return 0;
}

I have no idea which test case am I missing that is causing my test cases to fail. Any help ?

Consider test case: 5 1 1 3
Actual answer:2
Answer by your code :3
i. e., check for the test cases in which box D contains more than one box

else if(sum-a<=d||sum-b<=d||sum-c<=d)
cout<<“2”<<endl;
else
cout<<“3”<<endl;