POJ2429--GCD & LCM Inverse (UNSOLVED)
2024-08-21 23:17:33
Given two positive integers a and b, we can easily calculate the greatest common divisor (GCD) and the least common multiple (LCM) of a and b. But what about the inverse? That is: given GCD and LCM, finding a and b.
Input
The input contains multiple test cases, each of which contains two positive integers, the GCD and the LCM. You can assume that these two numbers are both less than 2^63.
Output
For each test case, output a and b in ascending order. If there are multiple solutions, output the pair with smallest a + b.
Sample Input
3 60
Sample Output
12 15
最新文章
- [MySQL] 分页优化
- ubuntu下新建用户
- 自定义UICollectionLayout布局 —— UIKit之学习UICollectionView记录一《瀑布流》
- java返回一个简单的日历
- windows10搭建django1.10.3+Apache2.4
- 移动平台对于META标签的定义[转]
- 制作登录界面,登录成功后把用户名放在session里,在第3个页面读取session显示用户名
- 统计单词个数及词频(C++实现)
- tornado autoreload 模式
- alpha发布用户数
- yum install 与 yum groupinstall 的区别
- Linux kernel scriptes bin2c ";\x";
- 【转】ASP.NET MVC 数据验证及相关内容
- vim 自动在操作符 前后加上空格 C语言
- SQL学习(1)初学实验:SQL Server基本配置及基本操作
- jQuery中哪几种选择器
- 分享几个实用的Chrome扩展程序
- loadrunner 场景设计-设计与实践
- Linux系统文件目录
- UITableViewCell图片视差效果
热门文章
- python multiprocessing 和tcp
- dev accordionControl panelcontorl 使用
- string+和stringbuffer的速度比较
- 解决Address is in use:Windows和Linux通过杀死进程
- 洛谷3084 [USACO13OPEN]照片Photo
- Python中特殊函数和表达式lambda,filter,map,reduce
- php 类与对象
- Java 线程池 Executor 框架
- JDK8集合类源码解析 - LinkedList
- iframe高度自适应实现方案