ARCTAN - Use of Function Arctan
来源:互联网 发布:移动互联网数据 编辑:程序博客网 时间:2024/04/28 13:46
题目地址请点击——
ARCTAN
Description
相信大家都看得懂英文吧,我就不翻译了吧…………
It is easy to know that
Given number
Input
The first line contains a integer number
Output
Sample Input
1
Sample Output
5
Solution
解法一:附上扫雷神犇Cai的坑爹解法。
解法二:
由
得
设
则
那么
设
则
设
枚举
Code
因为有代码长度限制,所以读者在复制代码的时候请注意删除缩进以及空格…………
#include<iostream>#include<cmath>typedef unsigned long long L;using namespace std;L t,i,T,a,b,k;main(){ cin>>t; while(t--){ cin>>a; T=a*a*4+4; b=sqrt(T); i=b+1; while(--i) if(!(T%i)&&!((i+T/i)&1)){ k=(T/i-i)/2; break; } cout<<2*a+L(sqrt(T+k*k)+0.5)<<endl; } return 0;}
- ARCTAN - Use of Function Arctan
- SPOJ :Use of Function Arctan
- SPOJ1440 Use of Function Arctan
- SPOJ Use of Function Arctan
- A - Use of Function Arctan[SPOJ]
- SPOJ ARCTAN Use of Function Arctan (三角公式atrtan 高中数学)
- spoj ARCTAN
- 关于ArcTan的一个公式--ArcTan(a)+ArcTan(b)
- POJ 1183-arctan
- joj 1839: Arctan
- 计算 π的值 其中有 arctan的实现部分
- xilinx cordic IP核的用法- arctan的算法
- pascal中的xor,shr,shl,Int(),ArcTan()等运算符详解
- 《JAVA编程技巧1001条》第341条:数学函数 ARCTAN;
- Use of deleted function error with Boost
- 错误代码: 1111 Invalid use of group function
- Invalid use of group function解决办法
- How to use the function of assembly.
- Android-扫二维码和生成二维码
- CentOS常用操作(CentOS 7X)
- 2016长城信息杯中国大学生程序设计竞赛中南邀请赛 xtu 1246 Heartstone
- 并发同步
- mysql导出部分字段数据 及限定条件
- ARCTAN - Use of Function Arctan
- 2016长城信息杯中国大学生程序设计竞赛中南邀请赛 xtu 1244 Gambling
- gitlab
- awk中的循环和判断语句(转自何小波)
- 仿百度一下即时搜索效果
- 内存分析方法和JVM的java heap space问题处理
- 独特性,就是你最好的竞争力
- 2016长城信息杯中国大学生程序设计竞赛中南邀请赛 xtu 1245 Hamiltonian Path
- mac安装配置redis