HDU 6033 数论
来源:互联网 发布:手机vpn代理软件 编辑:程序博客网 时间:2024/06/05 04:13
题目
Add More Zero
题意
给一个范围为[1,105]的整数 n,求满足10m <= 2n 的最大整数 m
题解
数论,签到题,对 2n 求对数,然后下取整就行了
代码
#include <algorithm>#include <bitset>#include <cstring>#include <cstdio>#include <cmath>#include <cstdlib>#include <climits>#include <iostream>#include <list>#include <map>#include <queue>#include <set>#include <stack>#include <string>#include <vector>using namespace std;int main(){ double x = log(2)/log(10); int m; int t = 1; while(cin >> m){ int ans = (int)floor(m * x); printf("Case #%d: %d\n",t++,ans); } return 0;}
阅读全文
0 0
- HDU 6033 数论
- HDU 6033 Add More Zero 数论 水题
- HDU 2204 (数论)
- 数论 MillerRabin hdu 3792
- HDU 3123 数论
- 【数论】HDU-4196-Remoteland
- HDU 3988 数论
- HDU 1787 数论
- hdu 1395 数论
- HDU 2104数论 欧几里得
- HDU 1060 数论
- HDU 2161 Primes 数论
- HDU 1695 GCD 数论
- HDU 1568 Fibonacci 数论
- hdu 4542 数论
- hdu 1722(数论)
- hdu 1492(数论)
- hdu 2554 (数论)
- 测试之黑盒测试用例设计方法(等价类划分法)
- SpringMVC、Spring和Struts的区别
- Minimax Triangulation UVA
- 最全Pycharm教程(36)——Pycharm中Vagrant高级技巧
- webstorm sublime工具代码简写
- HDU 6033 数论
- java.sql.SQLException:ORA-01861:文字和格式字符串不匹配
- 三种线程间的通信方式(让随机被调用的线程变成"人为调用"的线程)
- 性能测试时常用的术语及意义
- 私有IP,A类IP地址,B类IP地址,C类IP地址
- 使用Spring实现读写分离
- hive与hbase区别
- IntelliJ IDEA工具
- hdu 1379 DNA Sorting