• [D] Divide Exactly

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • 3, 7, 15, 31, 63, 127...
    Can you find the law? OK, just 2 ^ N -1.
    So, question follows. If I give you a integer N, can you find the minimum M makes (2 ^ N - 1) % (2 ^ M - 1) = 0? N and M is at least 2.
  • 输入
  • Input until EOF.
    Each test contains one integer N (2 <= N <= 1,100,000,000).
  • 输出
  • One integer M will be the output.
  • 样例输入
  • 2
    3
    
  • 样例输出
  • 2
    3
    
  • 提示
  • 来源
  • Hungar
  • 操作

显示春菜