比比谁的长?
查看原帖
比比谁的长?
1382224
Iain_楼主2025/6/20 19:53
#include<bits/stdc++.h>
using namespace std;
int x,y;
int main(){
//	freopen(".in", "r", stdin);
//	freopen(".out", "w", stdout);
//	ios::sync_with_stdio(false);
//	cin.tie(0);cout.tie(0);
    cin>>x>>y;
    srand(time(0));
    if(x<y){
    	if(rand()%2==1)cout<<"Y";
    	else cout<<"y";
    	if(rand()%2==1)cout<<"E";
    	else cout<<"e";
    	if(rand()%2==1)cout<<"S";
    	else cout<<"s";
	}
    else if(y<x){
    	if(rand()%2==1)cout<<"N";
    	else cout<<"n";
    	if(rand()%2==1)cout<<"O";
    	else cout<<"o";
	}
    else cout<<"equal probability";
	return 0;
}

583个字符!

2025/6/20 19:53
加载中...