比赛 202110省实验桐柏一中普及组联赛 评测结果 EEEEEEEEEE
题目名称 分数约分 最终得分 0
用户昵称 造远奇柳 运行时间 1.699 s
代码语言 C++ 内存使用 5.74 MiB
提交时间 2021-10-18 17:43:35
显示代码纯文本
#include<iostream>
#include<cstdio>
using namespace std;
int gcd(int x,int y)
{
	if(y==0)return x;
	return gcd(y,x%y);
} 
int main()
{
	freopen("yuefen.in","w",stdin);
	freopen("yuefen.out","r",stdout);
	int a,b;
	cin>>a>>b;
	cout<<a/gcd(a,b)<<" "<<b/gcd(a,b);	
	fclose(stdin);
	fclose(stdout);
}