http://codeforces.com/contest/9
A
gcd水题
1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt<<1 4 #define rson mid+1,r,rt<<1|1 5 #define sqr(x) ((x)*(x)) 6 #define maxn 1000010 7 typedef long long ll; 8 /*#ifndef ONLINE_JUDGE 9 freopen("1.txt","r",stdin); 10 #endif */ 11 int gcd(int a,int b){ 12 if(b==0) return a; 13 return gcd(b,a%b); 14 } 15 16 int main(){ 17 #ifndef ONLINE_JUDGE 18 // freopen("1.txt","r",stdin); 19 #endif 20 int n,m; 21 cin>>n>>m; 22 n=max(n,m); 23 int fz=6-n+1; 24 int fm=6; 25 int d=gcd(fz,fm); 26 // cout<<fz<<" "<<fm<<endl; 27 cout<<fz/d<<"/"<<fm/d<<endl; 28 }