BZOJ 1349: [Baltic2006]Squint 题解
来源:互联网 发布:淘宝标题改了有影响吗 编辑:程序博客网 时间:2024/05/21 22:39
1349: [Baltic2006]Squint
Time Limit: 1 Sec Memory Limit: 64 MB
Submit: 572 Solved: 338
Description
Write a program to calculate integer square roots.
Input
The input is read from a text file named squint.in. Its only line consists of an integer 0 < = n < 2^63 .
Output
Its only line consists of the smallest nonnegative integer q such that q^2 >= n .
Sample Input
122333444455555
Sample Output
11060446
HINT
sqrt(122333444455555)=11060445.038765619 .
Source
题解:
哇这种题还需要题解嘛
#include<cstdio>#include<iostream>#include<cmath>using namespace std;long long a,b;int main(){ scanf("%lld",&a);b=sqrt(a); if(b*b==a) printf("%lld",b); else printf("%lld",b+1); return 0;}
阅读全文
0 0
- BZOJ 1349: [Baltic2006]Squint 题解
- bzoj1349 [Baltic2006]Squint
- [bzoj1349][Baltic2006]Squint 大水题
- bzoj题解
- bzoj 1218题解
- bzoj 2456 mode 题解
- bzoj 2506 calc 题解
- BZOJ 1257 (题解)
- bzoj 1003 题解
- bzoj 1053 题解
- bzoj 2761 题解
- bzoj 2464 题解
- bzoj 1085 题解
- bzoj 2464 题解
- bzoj 1045 题解
- bzoj 1059 题解
- bzoj 1054 题解
- bzoj 1050 题解
- 码云+git+idea
- 使用Python完成公司名称和地址的模糊匹配
- 文章标题
- 一分钟教你nginx反向代理
- 第2章 Python笔记 列表和元组
- BZOJ 1349: [Baltic2006]Squint 题解
- 电动汽车仿真软件
- 用css来解决JS中的问题
- c++重载
- java编程_servlet(续)
- G
- GoogleDrive 登录故障排除-2
- hihoCoder #1114 : 小Hi小Ho的惊天大作战:扫雷·一
- Linux定时任务问题记录