「已注销」 2024-10-04 16:44 采纳率: 50%
浏览 4
已结题

第二次找翻译(我英语太好了)

描述

Barley the dog loves treats. At the end of the day he is either happy or sad depending on thenumber and size of treats he receives throughout the day. The treats come in three sizes: small,medium, and large. His happiness score can be measured using the following formula:
1×S+2×M+3×L
where S is the number of small treats, M is the number of medium treats and L is the number of large treats.
If Barley’s happiness score is 10 or greater then he is happy. Otherwise, he is sad. Determine whether Barley is happy or sad at the end of the day.
输入描述

There are three lines of input. Each line contains a non-negative integer less than 10. The first line contains the number of small treats, S, the second line contains the number of medium treats, M,and the third line contains the number of large treats, L, that Barley receives in a day.
输出描述

If Barley’s happiness score is 10 or greater, output happy. Otherwise, output sad.
如果 Barley 的快乐分数为 10 或更高,则输出 happy。否则,输出 sad。
样例输入 1

3
1
0
样例输出 1

sad
样例输入 2

3
2
1
样例输出 2

happy
提示

数据范围与提示
Explanation of Output for Sample Input 1
Barley’s happiness score is 1 × 3 + 2 × 1 + 3 × 0 = 5, so he will be sad.
Explanation of Output for Sample Input 2
Barley’s happiness score is 1 × 3 + 2 × 2 + 3 × 1 = 10, so he will be happy.

  • 写回答

3条回答

  • zsr旺财97 2024-10-04 16:46
    关注

    回答不易,望采纳
    Barley 喜欢吃零食。在一天结束时,他要么高兴,要么悲伤,这取决于他一整天收到的零食的数量和大小。零食有三种尺寸:小号、中号和大号。他的快乐分数可以用以下公式来衡量:
    1×S+2×M+3×L
    ,其中 S 是小零食的数量,M 是中等零食的数量,L 是大零食的数量。
    如果 Barley 的快乐分数为 10 或更高,则他很快乐。否则,他会感到难过。确定 Barley 在一天结束时是快乐还是悲伤。
    输入描述

    有三行输入。每行包含一个小于 10 的非负整数。第一行包含小零食的数量 S,第二行包含中等零食的数量 M,第三行包含 Barley 在一天内收到的大零食的数量 L。
    输出描述

    如果 Barley 的快乐得分为 10 或更高,则输出 happy。否则,输出 sad。
    如果 Barley 的快乐分数为 10 或更高,则输出 happy。否则,输出 sad。
    样例输入 1

    3
    1
    0
    样例输出 1

    sad
    样例输入 2

    3
    2
    1
    样例输出 2

    happy
    提示

    数据范围与提示
    样本输入 1的输出说明:
    Barley 的快乐分数是 1 × 3 + 2 × 1 + 3 × 0 = 5,所以他会很难过。
    样本输入 2 的输出说明:
    Barley的快乐分数是 1 × 3 + 2 × 2 + 3 × 1 = 10,所以他会很快乐。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 10月12日
  • 已采纳回答 10月4日
  • 创建了问题 10月4日

悬赏问题

  • ¥20 IDEA 下 lombok 不生效,找不到get
  • ¥15 sas无法加载传输模块
  • ¥15 ABAQUS模拟钢管混凝土往复荷载,滞回曲线卸载荷载却比加载荷载大是为什么
  • ¥15 IOS设置了charels得代理,但是显示无互联网连接,无法打开chls.pro/ssl下载证书
  • ¥40 一维度流体仿真软件前端如何开发
  • ¥500 DELPHI环境安卓定位实时发送及回调消息展示
  • ¥15 易视腾is-E5-ngh怎么刷机,求各位们分享一下吧
  • ¥15 Androidstudio的程序,求各位帮帮我
  • ¥15 岩石声发射矩张量反演软件
  • ¥15 用Python完成一个任务