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. [noi2002]荒岛野人 拓展欧几里得

    克里特岛以野人群居而著称.岛上有排列成环行的M个山洞.这些山洞顺时针编号为1,2,…,M.岛上住着N个野人,一开始依次住在山洞C1,C2,…,CN中,以后每年,第i个野人会沿顺时针向前走Pi个洞住下来 ...

  2. POJ2115 C Looooops ——模线性方程(扩展gcd)

    题目链接:http://poj.org/problem?id=2115 C Looooops Time Limit: 1000MS   Memory Limit: 65536K Total Submi ...

  3. html5--3.20 新增的keygen元素

    html5--3.20 新增的keygen元素 学习要点 掌握fieldset/legend元素的用法(和figure和figcaption很像,只不过是作用于表单) 了解keygen元素的用法 fi ...

  4. XML简介——可扩展标记语言(Extensible Markup Language)

    (What) XML是什么? XML指可扩展标记语言(Extensible Markup Language) 1.  XML是一种标记语言,类似HTML. 2.  XML具有自我描述性 3.  XML ...

  5. linux系统CentOS6.5下tokudb数据库引擎的安装

    tokuDB是一个关于mysql数据引擎的开源项目,官网对其特点的描述主要有三点: 1.高压缩比,官方宣称可以达到1:12. 2.高insert性能,官方称至少比innodb高9倍. 3.可以在线添加 ...

  6. 【旧文章搬运】为什么win32k.sys在System进程空间无法访问

    原文发表于百度空间,2010-01-02========================================================================== 玩过Sha ...

  7. SSIS 增量更新

    本文转自 http://sqlblog.com/blogs/andy_leonard/archive/2007/07/09/ssis-design-pattern-incremental-loads. ...

  8. 2.8-2.10 HBase集成MapReduce

    一.HBase集成MapReduce 1.查看HBase集成MapReduce需要的jar包 [root@hadoop-senior hbase-0.98.6-hadoop2]# bin/hbase ...

  9. SqlServer2012——表

    1.数据类型 数字类型:int,smallint, 高精度:decimal,numeric 日期和时间:datetime,smalldatetime 二进制:binary,varbinary,imag ...

  10. LeetCode: 575 Distribute Candies(easy)

    题目: Given an integer array with even length, where different numbers in this array represent differe ...