Menu Close
  • Categories
  • Tags
  • About
Close
    • llmooon's blog
    • Categories
    • Tags
    • Search

    Codeforces beta round #9 a_die roll

    Published: January 27, 2019 by 아형 Creative Commons Licence

    • Categories:
    • Algorithm 74
    • Tags:
    • 알고리즘 72
    #include<iostream>
    #include<algorithm>
    using namespace std;
    
    int a, b;
    
    int main() {
    	scanf("%d %d", &a, &b);
    	int max_num = max(a, b);
    	int right = 6;
    	int rest = 6 - max_num + 1;
    	for (int i = 6; i >=2; i--) {
    		if (rest%i == 0 && right%i==0) {
    			rest /= i;
    			right /= i;
    		}
    	}
    	printf("%d/%d", rest, right);
    
    }
    
    
    Back to Top
    ← Oauth Codeforces beta round #9 c hexadecimal's numbers →

    About

    A gem-based responsive simple texture styled Jekyll theme.

    Theme Simple Texture developed by Yi Zeng, powered by Jekyll.

    Back to Top