#include<iostream>
#include<algorithm>
using namespace std;
typedef long long LL;
const int N = 110;
int n;
LL q[N],a[N],b[N];
int cnt;
LL gcd(LL a,LL b){
return b ? gcd(b,a%b) : a;
}
LL gcdSub(LL a,LL b){
if(a<b) swap(a,b);
if(b==1) return a;
return gcdSub(b,a/b);
}
int main(){
scanf("%d",&n);
for(int i=0;i<n;i++) scanf("%lld",&q[i]);
sort(q,q+n);
for(int i=1;i<n;i++){
if(q[i]!=q[i-1]){
LL d = gcd(q[i],q[0]);
a[cnt] = q[i]/d;
b[cnt] = q[0]/d;
cnt++;
}
}
LL up = a[0],down = b[0];
for(int i=1;i<cnt;i++){
up = gcdSub(up,a[i]);
down = gcdSub(down,b[i]);
}
printf("%lld/%lld",up,down);
}
03-02
756
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-01
1095
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)