HBC244916EasyTreasure hunter题解

一沫阳光 算法基础篇 41 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。
There is a device in Inazuma, like the picture shows. It contains some stones and each stone has one to three gleamy petals on it. If one stone is knocked, the gleamy petals on it and the adjacent stone will change as follow: 1->2 2->3 3->1 When the numbers of gleamy petals on each stone come to equal, an exquisite treasure box will appear as reward. luckly, the scholars in Sumeru created a machine which can run various codes. The traveller recorded the number of gleamy petals on each stone and came to Sumeru to get solution by the machine. However, the traveller doesn't know how to write code. Can you help to write a program which can tell the traveller how to make all the stones have the same number of the gleamy petals?

There is a device in Inazuma, like the picture shows. It contains some stones(placed in a line) and each stone has one to three gleamy petals on it. If one stone is knocked, the gleamy petals on it and the adjacent stone(if has) will change as follow: 1->2 2->3 3->1 When the numbers of gleamy petals on each stone come to equal, an exquisite treasure box will appear as reward. luckly, the scholars in Sumeru(The Kingdom of Wisdom) created a machine which can run various codes(include c++, java and so on). The traveller recorded the number of gleamy petals on each stone and came to Sumeru to get solution by the machine. However, the traveller doesn't know how to write code. Can you help to write a program which can tell the traveller how to make all the stones have the same number of the gleamy petals?

HBC244916EasyTreasure hunter题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
想要在职场中立于不败之地?那就来试试全网最全C++题库,让您在练习中快速提升技能。

标签: HBC244916EasyTreasure hunter题解