武汉理工大学第二届大学生程序设计竞赛(同步赛)补题

L.数格子

…手贱好吧…气死了!!!
D.星际穿越

H.戳木棍

//精度问题;
/*@author:ntttttt
to->myself->add oil!*/
#include<bits/stdc++.h>
using namespace std;
#define gcd __gcd
#define _orz ios::sync_with_stdio(false)
#define fi first
#define se second
#define lc i<<1
#define rc i<<1|1
#define sf scanf
#define pf printf
#define mem(str,num) memset(str,num,sizeof(str))
#define lowbit(a) ((a)&(-a))
typedef long long ll;
typedef pair<int,int> pll;
typedef pair<ll,ll> pLL;
const int inf = 0x3f3f3f3f;
const long long mod = 1e9+7;
const int N = 1e6+10;
ll qpow(ll a, ll b){ll res = 1; while(b){if(b&1)res = a*res%mod;b >>= 1;a=a*a%mod;}return res;}
int main()
{
    double n,m;
    cin >> n >> m;
    double x ;
    double b = sqrt(n)+sqrt(m);
    x = pow(b,6);
    ll xx = x;
    if(fabs(x -xx) > 1e-2)
            xx++;
    cout << xx << endl;
    return 0;
}

--------------------------------------------------------------------------------------
/*@author:ntttttt
to->myself->add oil!*/
#include<bits/stdc++.h>
using namespace std;
#define gcd __gcd
#define _orz ios::sync_with_stdio(false)
#define fi first
#define se second
#define lc i<<1
#define rc i<<1|1
#define sf scanf
#define pf printf
#define mem(str,num) memset(str,num,sizeof(str))
#define lowbit(a) ((a)&(-a))
typedef long long ll;
typedef pair<int,int> pll;
typedef pair<ll,ll> pLL;
const int inf = 0x3f3f3f3f;
const long long mod = 1e9+7;
const int N = 1e6+10;
ll qpow(ll a, ll b){ll res = 1; while(b){if(b&1)res = a*res%mod;b >>= 1;a=a*a%mod;}return res;}
int main()
{
    double n,m;
    cin >> n >> m;
    double x = 1;
    double b = sqrt(n)+sqrt(m);
    double res = 1;
    for(int i = 1;i<=6;i++)
        res *= b;
    printf("%lld\n",(ll)(res+0.2));    
    return 0;
}
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值