虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

您现在的位置是:虫虫下载站 > 资源下载 > 数据结构 > 2^x mod n = 1 acm竞赛题 Give a number n, find the minimum x that satisfies 2^x mod n = 1. Input

2^x mod n = 1 acm竞赛题 Give a number n, find the minimum x that satisfies 2^x mod n = 1. Input

  • 资源大小:2 K
  • 上传时间: 2015-06-02
  • 上传用户:A15117704533
  • 资源积分:2 下载积分
  • 标      签: mod satisfies minimum number

资 源 简 介

2^x mod n = 1 acm竞赛题 Give a number n, find the minimum x that satisfies 2^x mod n = 1. Input One positive integer on each line, the value of n. Output If the minimum x exists, print a line with 2^x mod n = 1. Print 2^? mod n = 1 otherwise. You should replace x and n with specific numbers. Sample Input 2 5 Sample Output 2^? mod 2 = 1 2^4 mod 5 = 1

相 关 资 源

您 可 能 感 兴 趣 的