My issue
include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin>>t;
while(t–)
{
int x,y,z;
cin>>x>>y>>z;
cout<<x*(ceil(y/(z*1.0)))<<endl;
}
return 0;
}
My code is working fine with the given test cases, still it is not working on one last hidden test case.
I also saw the submissions due to this problem yet was unable to find the problem.
Can anyone help me with what is wrong with my solution, or is there something I am missing here?
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin>>t;
while(t--)
{
int x,y,z;
cin>>x>>y>>z;
cout<<x*(ceil(y/(z*1.0)))<<endl;
}
return 0;
}
Problem Link: BOOKPACK Problem - CodeChef