spoj DPRSDCDR - Depressed Coder
来源:互联网 发布:sas 优化案例 编辑:程序博客网 时间:2024/06/06 07:12
题意:给出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;}
0 0
- spoj DPRSDCDR - Depressed Coder
- Coder Ratings+SPOJ+树状数组
- spoj BCEASY - Bottom Coder (Easy)
- be depressed
- spoj 360 Bottom Coder (Easy) 非常有趣的题目
- Coder
- coder
- Coder
- coder
- Coder
- SPOJ
- SPOJ
- SPOJ
- SPOJ
- SPOJ
- SPOJ
- SPOJ
- SPOJ
- 排序用法 order by asc desc
- 关于Python pip 安装第三方模块失败
- 《C++ Primer》读书笔记-第五章 语句
- 相机的Angle of View, Field of view && Focal length
- iOS下将照片保存到相册的三种方法
- spoj DPRSDCDR - Depressed Coder
- Setting 之dashboard 点击跳转流程
- 在Ubuntu系统安装可用的QQ
- WEB:常用标签学习实例
- linux内存相关proc文件解析
- Mysql多表关联delete和update操作
- Delphi IDHTTP用法详解
- HBase学习笔记 --- RDBMS sqoop 导入数据到HBase
- Android开发之材料设计兼容库(Design Support Library)