acm 算法 java_有关acm算法的一道java题

Description:有一天,Extra来到一个青蛙王国,看到一群青蛙在跳水,于是他感到很神奇,就在一旁数青蛙:“一只青蛙一张嘴,两只眼睛四条腿,扑通一声跳下水……”不过Extra已经不在是...

Description:

有一天,Extra来到一个青蛙王国,看到一群青蛙在跳水,于是他感到很神奇,就在一旁数青蛙:“一只青蛙一张嘴,两只眼睛四条腿,扑通一声跳下水……”不过Extra已经不在是幼儿园的小朋友了,他会使用英文来数。他还能从第K只青蛙数到第S只青蛙

Input:

第一行输入N,表示有几组数据

每一组包括两个大于0的整数K,S,表示从第K只青蛙数到第S只青蛙

Output:

按以下格式输出

1 frog has 1 mouth, 2 eyes and 4 legs, jumps into the water with a splash.

2 frogs have 2 mouths, 4 eyes and 8 legs, jump into the water with splash splash.

……

Sample Input:

3

2 3

7 9

10 11

Sample Output:

2 frogs have 2 mouths, 4 eyes and 8 legs, jump into the water with splash splash.

3 frogs have 3 mouths, 6 eyes and 12 legs, jump into the water with splash splash splash.

7 frogs have 7 mouths, 14 eyes and 28 legs, jump into the water with splash splash splash splash splash splash splash.

8 frogs have 8 mouths, 16 eyes and 32 legs, jump into the water with splash splash splash splash splash splash splash splash.

。。。

K,S大小不确定

展开

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值