当前位置 博文首页 > standard_input的博客:每日一题简单版:2021-08-26
?传送门
刚一看这题是不是懵圈了,这怎么算呀。
其实我们只需要枚举一下已经掷过的两个人的大小关系,然后在枚举一下大的那个人的数。。。
代码如下:
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<string>
using namespace std;
string res[7]={"0/1", "1/6", "1/3", "1/2", "2/3", "5/6", "1/1"};
int main(){
int a,b;
cin>>a>>b;
cout<<res[7-max(a, b)];
return 0;
}
cs