View Code of Problem 3566

#include <iostream>

using namespace std;

int main()
{
    int t,i=0;
    cin>>t;
    while(i<t)
    {
        i++;
        int r,c,w;
        cin>>r>>c>>w;
        int sum=0;
        sum=(c/w)*r+w-1;
        cout<<"Case #"<<i<<": "<<sum<<endl;
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 3566