标签:blog http io ar div on log amp ef
题目链接:http://acm.nefu.edu.cn/JudgeOnline/status.php?problem_id=116&order=1
解题思路:求最小公倍数
#include<stdio.h> long long gcd(long long a,long long b) { if(b==0) return a; else return gcd(b,a%b); } int main() { long long m,n; while(scanf("%lld %lld",&m,&n)!=EOF) { printf("%lld\n",m/gcd(m,n)*n); } }
标签:blog http io ar div on log amp ef
原文地址:http://www.cnblogs.com/wuyuewoniu/p/4085881.html