#include using namespace std; int T,n; int f[1005],g[1005]; int gcd(int x,int y) { if(x==0||y==0)return x+y; return gcd(y%x,x); } int main() { scanf("%d",&T); while(T--) { scanf("%d",&n); for(int i=0;i=0;i--) { if(f[i]!=0||g[i]!=0) { int GCD=gcd(f[i],g[i]); printf("%d/%d\n",f[i]/GCD,g[i]/GCD); break; } } } }