HDU2186
2019-05-30
19:31:10
水题
#include <bits/stdc++.h>
using namespace std;
int main()
{
int c;
scanf("%d", &c);
while(c--)
{
int n;
int sum = ;
scanf("%d", &n);
int a = n / ;
int b = (n - a) * / ;
int c = n - a - b;
if(a % == )
{
sum += a/;
}
else
{
sum += (a/) + ;
} if(b % == )
{
sum += b/;
}
else
{
sum += (b/) + ;
}
if (c % == )
{
sum += c / ;
}
else
{
sum += (c / ) + ;
}
cout << sum <<endl;
} return ;
}
HDU2186的更多相关文章
- OJ题目分类
POJ题目分类 | POJ题目分类 | HDU题目分类 | ZOJ题目分类 | SOJ题目分类 | HOJ题目分类 | FOJ题目分类 | 模拟题: POJ1006 POJ1008 POJ1013 P ...
- hdu 2186
#include <iostream> using namespace std; int main() { int a,b,c,k1,k2,k3,m,n; cin>>m; wh ...
随机推荐
- js post一个对象 在C#中怎么接收? 未解决
这个在C#中怎么接收?
- AcGePoint3d ads_point 转换
AcGePoint3d (AcGePoint2d )转换 ads_point 用:asDblArray函数. ads_point 转换AcGePoint2d 用asPnt2d(const doubl ...
- echarts图表初始大小问题及echarts随窗口变化自适应
最近在做一个轮播图,使用的是element的Carousel走马灯,每一个走马灯里是eachrts图,开始页面加载的时候发现echarts图并不能自适应,开始以为是走马灯的问题,后来发现不是 不知道大 ...
- 表单enctype属性传值问题
form表单的enctype设置为multipart/form-data后,表单中除了文件后台能拿到,其他值后台都拿不到. 知识点: 一.application/x-www-form-urlencod ...
- Django settings.py的一些配置
官方文档:settings配置 静态文件配置链接 # 语言改为中文: LANGUAGE_CODE = "zh-hans" # 时区由UTC改为Asia/Shanghai,这样有关时 ...
- ubuntu下Apache2配置
Ubuntu下Apache2的CGI简单配置:http://blog.csdn.net/a623891391/article/details/47170355 Ubuntu Apache的安装和配置以 ...
- 洛谷 2147 SDOI2008 Cave 洞穴勘测
[题解] 动态树模板题,只要求维护森林的连通性,直接上板子即可. #include<cstdio> #include<algorithm> #define N 500010 # ...
- APK动态加载框架 https://github.com/singwhatiwanna/dynamic-load-apk
https://github.com/singwhatiwanna/dynamic-load-apk
- ssm 数据库连接池配置
1.工程引入druid-1.1.2.jar包2.修改spring-common.xml文件 <!-- 1. 数据源 : DruidDataSource--> <bean id=&qu ...
- ansible common modules
##Some common modules[cloud modules] [clustering modules] [command modules]command - executes a comm ...