题意:给出ct,report数、做一个ct、report所需的时间、上课所花费的时间,问所消耗的时间之和是否小于等于11
代码如下:
#include <cstdio>
using namespace std;
class Solution
{
public:
void run()
{
scanf("%d", &t);
while (t--)
{
input();
solve();
}
}
private:
void input()
{
scanf("%d%d%d%d%d", &num_ct, &num_report, &time_ct, &time_report, &time_class);
}
void solve()
{
if (time_ct * num_ct + time_report * num_report + time_class <= 11)
{
printf("Khushi\n");
}
else
{
printf("Hotash\n");
}
}
private:
int t;
int num_ct, num_report, time_ct, time_report, time_class;
};
int main()
{
#ifndef ONLINE_JUDGE
freopen("e:\\program\\clion\\example\\spoj.txt", "r", stdin);
#endif
Solution solver;
solver.run();
return 0;
}