| 比赛 | 202110省实验桐柏一中普及组联赛 | 评测结果 | AAAAAAAAAW |
|---|---|---|---|
| 题目名称 | 分数约分 | 最终得分 | 90 |
| 用户昵称 | 䱖虁職 | 运行时间 | 0.000 s |
| 代码语言 | C++ | 内存使用 | 0.00 MiB |
| 提交时间 | 2021-10-18 19:07:39 | ||
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
ull gcd(ull a,ull b)
{
if(a%b==0)
{
return b;
}
else
{
return gcd(b,a%b);
}
}
int main(){
freopen("yuefen.in","r",stdin);
freopen("yuefen.out","w",stdout);
ull a,b;
scanf("%llu%llu",&a,&b);
ull c=gcd(a,b);
a/=c;
b/=c;
printf("%llu %llu\n",a,b);
return 0;
}