编程介的小学生 2017-01-15 13:27 采纳率: 20.5%
浏览 849
已采纳

RSA Factorization

Description

The positive integer n is given. It is known that n = p * q, where p and q are primes, q <= p and |q - kp| <= 105 for some given positive integer k. You must find p and q.
Input

Each line contains integers n (1 < n < 10120) and k (0 < k < 108).
Output

For each pair of numbers n and k print in separate line the product p * q such that q <= p.
Sample Input

35 1
121 1
1000730021 9
Sample Output

5 * 7
11 * 11
10007 * 100003

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-01-22 15:48
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 matlab求解平差
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 vue2登录调用后端接口如何实现
  • ¥85 永磁型步进电机PID算法