Unusual Team(水题)

一只狮子、老鼠和海狸组成的队伍需要从两个名字中选择一个作为参赛名称。他们进行了Facebook投票来帮助做决定。本篇将展示如何通过输入的投票数确定最终采用哪个团队名称。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Description

A lion, a mouse, and a beaver are one of the best teams at Animal University, and they have qualified to the ACM Arabella 2017 contest!

They want to choose their team name, and after many suggestions, they have reduced their options to two names: "FunkyMonkeys" and "WeWillEatYou".

They then created a poll on Facebook to help them with their final decision.

The results of the poll are now with Dr. Samer, and he will use the name with the highest votes to register the team. Can you help Dr. Samer to know which team name they will register with?

Input

The first line of input is T – the number of test cases.

The first line of each test case contains two integers ab (1 ≤ a, b ≤ 100) - the number of votes for "FunkyMonkeys" and "WeWillEatYou" respectively.

Output

For each test case, output a single line containing "FunkyMonkeys" (without quotes), if that name received more points or tied with “WeWillEatYou”, otherwise output “WeWillEatYou”.

Sample Input

2
15 20
70 70

Sample Output

WeWillEatYou
FunkyMonkeys

代码如下:

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdlib>
#include <queue>
#include <vector>
#include <string>
#define For(i,n) for(int i=0;i<n;i++)
#define mem(a,b) memset(a,b,sizeof(a))
using namespace std;
typedef long long ll;
const int maxn = 1e4+5;
const int INF = 0x3f3f3f3f;
const double Pi = acos(-1);
int main() {
    int t;
    int a,b;
    cin >>  t;
    while(t--){
        cin >>a >> b;
        if(b > a)
            cout << "WeWillEatYou" << endl;
        else
            cout <<"FunkyMonkeys" << endl;

    }
    return 0;
}

.equals(Obje​​ct)方法在Java中用于比较两个对象是否相等。它检查两个对象的内容是否相同而不是引用是否相同。通常,我们可以使用"=="运算符来比较基本数据类型的值或判断两个对象引用是否相等。但是,对于比较复杂的对象,比如自定义的类对象,它们可能具有相同的属性值,但却不被认为是相等的,因为它们不是同一个对象的实例。 .equals(Obje​​ct)方法为我们提供了一种自定义比较两个对象内容的方式。这个方法是从Object类继承而来的,因此在所有的类中都可用。某些类,比如String类、Integer类等,已经重写了.equals(Obje​​ct)方法,以便实现比较它们的内容。但是,对于自定义的类,如果不重写.equals(Obje​​ct)方法的话,将继承Object类的默认实现,即比较两个对象的引用是否相等。 与"=="运算符相比,.equals(Obje​​ct)方法的作用更灵活、更具体。它可以根据具体的比较规则来决定两个对象是否相等。但是,由于.equals(Obje​​ct)方法的默认实现比较对象的引用,所以在自定义类中使用.equals(Obje​​ct)方法时,需要注意重写该方法以实现我们自己的比较逻辑。 综上所述,.equals(Obje​​ct)方法在Java中是相对不寻常的,因为大部分时候我们可以使用"=="运算符来比较对象引用是否相等。然而,在比较复杂对象内容时,.equals(Obje​​ct)方法提供了一种更具体、更灵活的比较方式。这是Java中为了满足不同需求而提供的一种对象比较工具。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值