Finding Bovine Roots
来源:互联网 发布:最新短期网络投资理财 编辑:程序博客网 时间:2024/06/08 14:56
#include <stdio.h>
#include <math.h>
const double theE[] ={1,1e-1,1e-2,1e-3,1e-4,1e-5,1e-6,1e-7,1e-8,1e-9};
int main()
{
double t1;
double t2;
int c,n;
scanf("%d",&c);
scanf("%d",&n);
double flo = n*theE[c];
int now=1;
while(1)
{
t1 = (long long)(pow(now+flo,2))+1;
t2 = pow(now+flo+theE[c],2);
if(t2>t1)
break;
now++;
}
printf("%lld\n",(long long)t1);
#include <math.h>
const double theE[] ={1,1e-1,1e-2,1e-3,1e-4,1e-5,1e-6,1e-7,1e-8,1e-9};
int main()
{
double t1;
double t2;
int c,n;
scanf("%d",&c);
scanf("%d",&n);
double flo = n*theE[c];
int now=1;
while(1)
{
t1 = (long long)(pow(now+flo,2))+1;
t2 = pow(now+flo+theE[c],2);
if(t2>t1)
break;
now++;
}
printf("%lld\n",(long long)t1);
}
//思路:
//longlong的输出格式
阅读全文
0 0
- Finding Bovine Roots
- Finding Bovine Roots
- POJ 3175 Finding Bovine Roots
- POJ 3175 Finding Bovine Roots
- POJ 3175 Finding Bovine Roots
- POJ 3175 Finding Bovine Roots
- POJ 3175 Finding Bovine Roots
- 1617 Finding Bovine Roots 解题报告
- POJ 3175 Finding Bovine Roots (枚举)
- POJ 3175 Finding Bovine Roots(思路)
- POJ 3175 Finding Bovine Roots 笔记
- (Relax ST1.15)POJ 3175 Finding Bovine Roots
- binary search -- finding roots
- CodeForces 750F. New Year and Finding Roots
- CodeForces 750F. New Year and Finding Roots
- 【codeforces 750F】New Year and Finding Roots
- Bovine Genomics
- Bovine Genomics
- 命令行下编译java程序,出现错误:编码GBK的不可映射字符
- linux下动态库的符号冲突、隐藏和强制优先使用库内符号
- 动态规划:HDU1712-ACboy needs your help(分组背包问题)
- SSL/TLS协议运行机制的概述
- 空间射线在普吕克坐标系中的表示
- Finding Bovine Roots
- 在507干活的第2天
- 数据库完整性
- Splay树简单操作
- linux 将权限赋给某个组 chown
- 第15章 使用远程服务
- Linux下tar的用法
- git简明教程
- 关系数据理论