Yakko Wakko and Dot world-famous animaniacs decided to rest from acting in cartoons and take a leave to travel a bit Yakko dreamt to go to Pennsylvania his Motherland and the Motherland of his ancesto
#include <iostream>
#include <algorithm>
#include <cmath>
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
int Y, W;
std::cin >> Y >> W;
int max_num = std::max(Y, W);
int remaining_chances = 6 - max_num + 1;
int numerator = remaining_chances;
int denominator = 6;
int divisor = gcd(numerator, denominator);
numerator /= divisor;
denominator /= divisor;
std::cout << numerator << "/" << denominator << std::endl;
return 0;
}
``
原文地址: http://www.cveoy.top/t/topic/h8O0 著作权归作者所有。请勿转载和采集!