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的更多相关文章

  1. OJ题目分类

    POJ题目分类 | POJ题目分类 | HDU题目分类 | ZOJ题目分类 | SOJ题目分类 | HOJ题目分类 | FOJ题目分类 | 模拟题: POJ1006 POJ1008 POJ1013 P ...

  2. hdu 2186

    #include <iostream> using namespace std; int main() { int a,b,c,k1,k2,k3,m,n; cin>>m; wh ...

随机推荐

  1. Django中 基于form的注册,基于ajax的登录

    1 form.py中写register的的form组件 from django import forms class Register(forms.Form): # 注册的form username ...

  2. 解决Mysql Workbench的Error Code: 1175错误

    错误: Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE ...

  3. css 样式 解释

    字体属性:(font) 大小 {font-size: x-large;}(特大) xx-small;(极小) 一般中文用不到,只要用数值就可以,单位:PX.PD 样式 {font-style: obl ...

  4. Linux下源码安装Peach-2.3.8教程

    在peach文件夹下运行 python peach.py ./samples/HelloWorld.xml 提示先安装4Suite-XML. 根据提示在dependences文件夹下安装,出现两次错误 ...

  5. 使用Python PIL库中的Image.thumbnail函数裁剪图片

    今天,是我来到博客园的第五天,发现自己还没有头像,想着上传ubuntu系统中我很喜欢的一个背景图片来当头像,但是因为图片过大,上传失败了.那么,我们如何使用python中强大的PIL库来进行图片裁剪呢 ...

  6. PAT 1094. The Largest Generation (层级遍历)

    A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level bel ...

  7. oi的小转折

    2018.6.4,衡水中学oier——Yu-shi,真正的走入了外网领域. 从最开始的连scanf都不打取地址,到现在懂了好多以前不敢去看的东西,心态逐渐的成长了.也许有过特别迷茫的时候,也许将来会有 ...

  8. 申请SSL证书怎样验证域名所有权

    申请域名型证书时,系统将提供以下三种方式验证域名的所有权,请根据自己的实际情况选择其中一种进行域名验证: 1.管理员邮箱验证 系统会向你选择的管理员邮箱 发送验证邮件,能够收到验证邮件,并点击邮件中验 ...

  9. JavaSE 学习笔记之Object对象(八)

    Object:所有类的直接或者间接父类,Java认为所有的对象都具备一些基本的共性内容,这些内容可以不断的向上抽取,最终就抽取到了一个最顶层的类中的,该类中定义的就是所有对象都具备的功能. 具体方法: ...

  10. Drop all tables in MySQL database

    Drop all tables in MySQL database Answer: MySQL does not have a command for removing all database ta ...