打卡信奥刷题(455)用Scratch图形化工具信奥P9299[普及组/提高组] [CCC 2023 J1] Deliv-e-droid

[CCC 2023 J1] Deliv-e-droid

题面翻译

机器人 Deliv-e-droid 在送快递,如果它成功地将一个快递送达,则它获得 50 50 50 元钱,如果未能成功送达,它被扣除 10 10 10 元钱。特别地,如果它送达的快递的数量大于未送达的,它会得到 500 500 500 元钱的奖励。

现在已知 Deliv-e-droid 送达了 P P P 个快递,未送达 C C C 个( 0 ≤ P , C ≤ 100 0 \leq P,C \leq 100 0P,C100),请实现一个程序,求出 Deliv-e-droid 所获得的钱(如果是倒扣的话用负数表示)。

题目描述

In the game, Deliv-e-droid, a robot droid has to deliver packages while avoiding obstacles.

At the end of the game, the final score is calculated based on the following point system:

  • Gain 50 50 50 points for every package delivered.
  • Lose 10 10 10 points for every collision with an obstacle.
  • Earn a bonus 500 500 500 points if the number of packages delivered is greater than the number of collisions with obstacles.

Your job is to determine the final score at the end of a game.

输入格式

The input will consist of two lines. The first line will contain a non-negative integer P P P,representing the number of packages delivered. The second line will contain a non-negative integer C C C,representing the number of collisions with obstacles.

输出格式

The output will consist of a single integer F F F,representing the final score.

样例 #1

样例输入 #1

5
2

样例输出 #1

730

样例 #2

样例输入 #2

0
10

样例输出 #2

-100

Scratch实现

在这里插入图片描述

后续

接下来我会不断用scratch来实现信奥比赛中的算法题、Scratch考级编程题实现、白名单赛事考题实现,感兴趣的请关注,我后续将继续分享相关内容

  • 13
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值