编程介的小学生 2017-09-03 05:58 采纳率: 20.5%
浏览 771
已采纳

Hearsay

Have you ever heard about the story "a man is dug out of a well"? It said that some people dug a well near their house so that they didn't have to bring water far away. They were very happy because the man in charge of carrying water now had time to do other things. However, when this news spread apace one by one. The people far away deemed that a man was dug out of a well! There are many famous stories about hearsays, which sound very surprising.

What may even consciousless misunderstandings result in? You are required to write a programme to find out this.

Suppose the information to be spread is just a number. Take 27 as an instance. After one day, the datum is rounded to 30. Another day later, somebody may think this number must have been rounded, so he concluded the original was 34, and another guy took this as the exact datum. One more day later, one thought that 34 is so similar with 35 that the datum became 35.
Suppose there are three kinds of operations which can be applyed on the datum:

Rounding, which can take place at any position.
Deem that the datum had been rounded and tell a more "resonable" integer.
Increase by one.

The poor datum is transforming through any one of the three operations above every day. Floating-point number is out of our consideration.

What we want to know is what the number could be after d days.

Input

Two unsigned integers: the original datum n and the days passed d, one pair per line.

There are many test cases through to the end of file.

Output

For each pair of input, output the largest datum we could get after d days in one line.

If the number is more than or equals to 100 times of the original datum, print "Aoao~~" after it.

The output must be the exact number. But when it is larger than or equals to 10, you should use scientific format, such as 1E1. "E" must be capital letter and no "+" is needed.

Sample Input

37 4
36 28

Sample Output

5E1
4.499E3 Aoao~~

  • 写回答

1条回答 默认 最新

  • devmiao 2017-09-03 14:52
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 易语言把MYSQL数据库中的数据添加至组合框
  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况