COGS 2687 讨厌整除的小明
二次联通门 : COGS 2687 讨厌整除的小明
/*
cogs 2687 讨厌整除的小明 打表出奇迹..
考场时看了一下样例就感觉有非常鬼畜的做法。。
手搞几组数据做法就出来了。。。
2333
*/
#include <cmath>
#include <cstdio> void read (long long &now)
{
now = ;
register char word = getchar ();
while (word < '' || word > '')
word = getchar ();
while (word <= '' && word >= '')
{
now = now * + word - '';
word = getchar ();
}
} int main (int argc, char *argv[])
{
freopen ("ming.in", "r", stdin);
freopen ("ming.out", "w", stdout);
long long T;
read (T);
long long N;
while (T--)
{
read (N);
N = log2 (N) + ;
printf ("%lld\n", N);
}
return ;
}
COGS 2687 讨厌整除的小明的更多相关文章
- hdu 4542 小明系列故事——未知剩余系
小明系列故事——未知剩余系 题意:操作0表示某数有n个约数,操作1为某数有n个非约数:n <= 47777,若是存在小于2^62的数符合,则输出该数,否则若是不存在输出Illegal,若是大于2 ...
- 小明的密码-初级DP解法
#include #include #include using namespace std; int visited[5][20][9009];// 访问情况 int dp[5][20][9009] ...
- 小明系列问题――小明序列(LIS)
小明系列问题――小明序列 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit ...
- ACM 擅长排列的小明
擅长排列的小明 时间限制:1000 ms | 内存限制:65535 KB 难度:4 描述 小明十分聪明,而且十分擅长排列计算.比如给小明一个数字5,他能立刻给出1-5按字典序的全排列,如果你想 ...
- ACM 懒省事的小明
懒省事的小明 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 小明很想吃果子,正好果园果子熟了.在果园里,小明已经将所有的果子打了下来,而且按果子的不同种 ...
- 管闲事的小明-nyoj51
描述某校大门外长度为L的马路上有一排树,每两棵相邻的树之间的间隔都是1米.我们可以把马路看成一个数轴,马路的一端在数轴0的位置,另一端在L的位置:数轴上的每个整数点,即0,1,2,……,L,都种有一棵 ...
- HDU2096 小明A+B
入门级都没到的水题!看到顺便就做了,AC记录喜+1 Description 小明今年3岁了, 现在他已经能够认识100以内的非负整数, 并且能够进行100以内的非负整数的加法计算. 对于大于等于100 ...
- 小明A+B[HDU2096]
小明A+B Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submi ...
- nyist 676 小明的求助
http://acm.nyist.net/JudgeOnline/problem.php?pid=676 小明的求助 时间限制:2000 ms | 内存限制:65535 KB 难度:2 描述 ...
随机推荐
- go语言学习笔记----模拟实现文件拷贝函数
实例1 //main package main import ( "bufio" "flag" "fmt" "io" & ...
- Spring Boot 五种热部署方式
[推荐]2019 Java 开发者跳槽指南.pdf(吐血整理)>>> 1.模板热部署 在SpringBoot中,模板引擎的页面默认是开启缓存的,如果修改了页面的内容,则刷新页面是得不 ...
- WPF 的 Application.Current.Dispatcher 中,Dispatcher 属性一定不会为 null
原文:WPF 的 Application.Current.Dispatcher 中,Dispatcher 属性一定不会为 null 在 WPF 程序中,可能会存在 Application.Curren ...
- MySQL数据库连接报错
数据库版本8.x和其他版本配置有区别: 1. 驱动依赖和连接 报错: Could not create connection to database server - java mysql conne ...
- js实现frame框架部分页面的刷新
一.先来看一个简单的例子: 下面以三个页面分别命名为frame.html.top.html.bottom.html为例来具体说明如何做. frame.html 由上(top.html)下(bottom ...
- brython的问题
brython 挺不错,但有bug. 再brython中使用mpmath做精确计算. 发现: int((103654973826275244659954807217085022028357821605 ...
- flashdevelop调用ios方法
来源:http://blog.csdn.net/zu12jing/article/details/7331397 flash开发工具用的是flashdevelop(由于flashdevelop还能直接 ...
- Python2 和 pip2 存在, Python3 也存在,但是 pip3 不存在的解决办法
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py sudo python3 get-pip.py 输入两行命令即可
- Win10-安装.net 2,3,.3.5
win10x64(ver1809).iso放镜像到光驱后执行cmd(.net3.5包括2和3)dism.exe /online /enable-feature /featurename:NetFx3 ...
- mount.cifs Windows共享目录权限755问题
umount -l /usr/local/tomcat7/webapps/dsideal_yy/html/down mount -t cifs -o rw,dir_mode=,file_mode=,s ...