Bryce1010模板

http://acm.hdu.edu.cn/showproblem.php?pid=6298

打表找规律:

#include<bits/stdc++.h>

using namespace std;

#define ll long long

const int MAXN = 1e5 + 5;

int main() {
ll t,n;
scanf("%lld",&t);
ll ans;
while(t--)
{
scanf("%lld",&n);
if(n%3==0)
ans=(n/3)*(n/3)*(n/3);
else if(n%4==0)
ans=(n/2)*(n/4)*(n/4);
else ans=-1;
printf("%lld\n",ans); }
return 0;
}

HDU6298(2018多校第一场)的更多相关文章

  1. Time Zone 【模拟时区转换】(HDU暑假2018多校第一场)

    传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6308 Time Zone Time Limit: 2000/1000 MS (Java/Others)  ...

  2. 【2018多校第一场】hdu6308-Time Zone(日期)

    Problem Description Chiaki often participates in international competitive programming contests. The ...

  3. HDU6300(2018多校第一场)

    Bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=6300 排个序就好了 #include<iostream> #include& ...

  4. HDU6301(2018多校第一场)

    Bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=6301 队友AC的,没怎么看 #include<iostream> #incl ...

  5. HDU6308(2018多校第一场)

    Bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=6308 将时间化简为分钟计算,同时不要用浮点数计算,精度会出现问题: 如果采用精度,最好加 ...

  6. HDU6299(2018多校第一场)

    Bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=6299 两个字符串的排序可以分成四种情况: (1)str1左少右多 vs str2 左多右 ...

  7. 2019牛客多校第一场 I Points Division(动态规划+线段树)

    2019牛客多校第一场 I Points Division(动态规划+线段树) 传送门:https://ac.nowcoder.com/acm/contest/881/I 题意: 给你n个点,每个点有 ...

  8. 牛客多校第一场 B Inergratiion

    牛客多校第一场 B Inergratiion 传送门:https://ac.nowcoder.com/acm/contest/881/B 题意: 给你一个 [求值为多少 题解: 根据线代的知识 我们可 ...

  9. HDU6581 Vacation (HDU2019多校第一场1004)

    HDU6581 Vacation (HDU2019多校第一场1004) 传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6581 题意: 给你n+1辆汽车, ...

随机推荐

  1. SCAU 1138 代码等式 并查集

    1138 代码等式[附加题] 该题有题解 时间限制:500MS  内存限制:65536K 提交次数:59 通过次数:21 题型: 编程题   语言: G++;GCC Description 一个代码等 ...

  2. elasticsearch function_score Query——文档排序结果的最后一道墙

    function_score Query The function_score query is the ultimate tool for taking control of the scoring ...

  3. 001-将Python源码转换为不需要环境的可执行文件

    1 安装pyinstaller pip install pyinstaller #或者 pip3 install pyinstaller 2 生成打包文件 在命令行中输入 pyinstaller -F ...

  4. bootstrap 学习笔记(3)---- 代码

    这节讲的是代码: 1.基本实例 <code></code>  <pre></pre> <kbd></kbd> 应用如下 1.Fo ...

  5. POJ1741:Tree

    浅谈树分治:https://www.cnblogs.com/AKMer/p/10014803.html 题目传送门:http://poj.org/problem?id=1741 这是一道树分治的模板题 ...

  6. Gulp-webpack简单应用

    1.配置环境:  在  webstorm  的控制台中  (1) cnpm install --save-dev gulp    (2)  cnpm install --save-dev gulp-w ...

  7. 纯css 图片自适应居中

    html 结构 <div class="container"> <div class="content"></div> &l ...

  8. php 有时候难以输出显示的信息可以用ob缓冲区来做

    有时候一些难以打印的信息可以通过缓冲区来做,比如手机扫码上的信息看不到这种, 当然也可以通过fiddler来抓包,也可以看到这些信息,直接上代码: <?php ob_start(); //开启缓 ...

  9. SetConsoleCtrlHandler() -- 设置控制台信号处理函数

    http://www.groad.net/bbs/thread-8253-1-1.html 当你在命令行里工作时,经常会输入 Ctrl-C 这个组合键以停止程序的运行.SetConsoleCtrlHa ...

  10. 揭开 iOS 7 之 Multipath TCP 的面纱(转)

    看到中文圈似乎讨论 iOS 7 的这个特性的还不多,于是我稍微研究了一下这个「Mutlipath TCP」,写点心得.过程是这样的: Olivier Bonaventure 通过 Wireshark ...