http://acm.hdu.edu.cn/showproblem.php?pid=2175

做得好辛苦的一道规律题,至于为什么辛苦。。dont ask me why。。。

n号盘子出现的位置是(1,3,5,7......)*2^(n-1)

#include <iostream>
using namespace std ;
typedef __int64 ll ;
int main()
{
ll a[] ;
a[]= ;
for(int i= ;i< ;i++)
a[i]=a[i-]* ;
ll n,m ;
while(~scanf("%I64d%I64d",&n,&m))
{
if(!n && !m)break ;
for(int i= ;i<=n ;i++)
{
ll temp=m/a[i] ;
if(temp& && m%a[i]==)
{
printf("%d\n",i) ;
break ;
}
}
}
return ;
}

HDU 2175的更多相关文章

  1. HDU 2175 汉诺塔IX (递推)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2175 1,2,...,n表示n个盘子.数字大盘子就大.n个盘子放在第1根柱子上.大盘不能放在小盘上.  ...

  2. HDU 2175 汉诺塔IX

    http://acm.hdu.edu.cn/showproblem.php?pid=2175 Problem Description 1,2,...,n表示n个盘子.数字大盘子就大.n个盘子放在第1根 ...

  3. 汉诺塔IX

    http://acm.hust.edu.cn/vjudge/contest/view.action?cid=76447#problem/E 汉诺塔IX Time Limit:1000MS     Me ...

  4. HDU——PKU题目分类

    HDU 模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 ...

  5. 【转载】图论 500题——主要为hdu/poj/zoj

    转自——http://blog.csdn.net/qwe20060514/article/details/8112550 =============================以下是最小生成树+并 ...

  6. [转] HDU 题目分类

    转载来自:http://www.cppblog.com/acronix/archive/2010/09/24/127536.aspx 分类一: 基础题:1000.1001.1004.1005.1008 ...

  7. HDU ACM 题目分类

    模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 104 ...

  8. HDU 5643 King's Game 打表

    King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember hi ...

  9. 转载:hdu 题目分类 (侵删)

    转载:from http://blog.csdn.net/qq_28236309/article/details/47818349 基础题:1000.1001.1004.1005.1008.1012. ...

随机推荐

  1. oracle 安装,登陆,配置

    1:查看: https://blog.csdn.net/u014177640/article/details/71023380/ 2:登陆  https://zhidao.baidu.com/ques ...

  2. SpringBoot开启缓存注解

    https://blog.csdn.net/sanjay_f/article/details/47372967 https://www.cnblogs.com/lic309/p/4072848.htm ...

  3. [py][lc]python的纸牌知识点

    模块collections-collections.namedtuple表示tuple 如表示一个坐标, t = (1,2), 搞不清楚. 如果这样就对了Point(x=1, y=2) from co ...

  4. POJ2992:Divisors(求N!因子的个数,乘性函数,分解n!的质因子(算是找规律))

    题目链接:http://poj.org/problem?id=2992 题目要求:Your task in this problem is to determine the number of div ...

  5. bzoj2733 / P3224 [HNOI2012]永无乡(并查集+线段树合并)

    [HNOI2012]永无乡 每个联通块的点集用动态开点线段树维护 并查集维护图 合并时把线段树也合并就好了. #include<iostream> #include<cstdio&g ...

  6. oracle数据库中导入Excel表格中的数据

    1.点击[工具]-->[ODBC 导入器],如图: 2.在导入器里选择第一个[来自ODBC的数据],用户名/系统DSN-->填写[Excel Files],输入用户名和密码,点击 [连接] ...

  7. Github 下载项目的某一分支版本

    参考:如何在 GitHub 下载某个程序的特定版本(代码)? 在安装ntf做int实验的时候,发现int demo的这个repo是该项目的一个branch,与master分支不一致(5 commits ...

  8. 请问使用jmeter在tcp取样器测试中服务器名称或ip,端口可以填变量值吗?

    请问使用jmeter在tcp取样器测试中服务器名称或ip,端口可以填变量值吗?

  9. 使用ARouter遇到的坑

    跨模块跳转不能跳转 需要被跳转的模块或者说使用了ARouter注解的模块都要加上这个 dependencies{    annotationProcessor rootProject.ext.arou ...

  10. AngularJS Toaster

    AngularJS Toaster 是 AngularJS 的扩展,实现了无堵塞消息通知.该项目对 Toastr 进行改造,原来的 Toastr 只支持 jQuery,而 AngularJS Toas ...