mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
24 lines
417 B
C++
24 lines
417 B
C++
|
#include <iostream>
|
||
|
using namespace std;
|
||
|
int main()
|
||
|
{
|
||
|
int n,k,m,t;
|
||
|
cin >> t;
|
||
|
while(t--)
|
||
|
{
|
||
|
cin >> n >> k >> m;
|
||
|
if(m>n)
|
||
|
cout << k<< endl;
|
||
|
else
|
||
|
{
|
||
|
int sub = n*k;
|
||
|
if(sub%m==0)
|
||
|
cout << sub/m;
|
||
|
else
|
||
|
cout << sub/m+1;
|
||
|
cout << endl;
|
||
|
}
|
||
|
}
|
||
|
return 0;
|
||
|
}
|