21788_Pupu

2022-5-16 18:20| 发布者: Hocassian| 查看: 27| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505848741500-Problem List-采集的数据-后羿采集器.html

Pro.ID

21788

Title

Pupu

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21788

AC

2

Submit

23

Ratio

8.70%

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/32768 K (Java/Others)
  • 描述

    There is an island called PiLiPaLa.In the island there is a wild animal living in it, and you can call them PuPu. PuPu is a kind of special animal, infant PuPus play under the sunshine, and adult PuPus hunt near the seaside. They fell happy every day.

    But there is a question, when does an infant PuPu become an adult PuPu?

    Aha, we already said, PuPu is a special animal. There are several skins wraping PuPu's body, and PuPu's skins are special also, they have two states, clarity and opacity. The opacity skin will become clarity skin if it absorbs sunlight a whole day, and sunshine can pass through the clarity skin and shine the inside skin; The clarity skin will become opacity, if it absorbs sunlight a whole day, and opacity skin will keep sunshine out.

    when an infant PuPu was born, all of its skins were opacity, and since the day that all of a PuPu's skins has been changed from opacity to clarity, PuPu is an adult PuPu.

    For example, a PuPu who has only 3 skins will become an adult PuPu after it born 5 days (What a pity! The little guy will sustain the pressure from life only 5 days old)

    Now give you the number of skins belongs to a new-laid PuPu, tell me how many days later it will become an adult PuPu?

    输入

    There are many testcase, each testcase only contains one integer N, the number of skins, process until N equals 0

    输出

    Description

    There is an island called PiLiPaLa.In the island there is a wild animal living in it, and you can call them PuPu. PuPu is a kind of special animal, infant PuPus play under the sunshine, and adult PuPus hunt near the seaside. They fell happy every day.

    But there is a question, when does an infant PuPu become an adult PuPu?

    Aha, we already said, PuPu is a special animal. There are several skins wraping PuPu's body, and PuPu's skins are special also, they have two states, clarity and opacity. The opacity skin will become clarity skin if it absorbs sunlight a whole day, and sunshine can pass through the clarity skin and shine the inside skin; The clarity skin will become opacity, if it absorbs sunlight a whole day, and opacity skin will keep sunshine out.

    when an infant PuPu was born, all of its skins were opacity, and since the day that all of a PuPu's skins has been changed from opacity to clarity, PuPu is an adult PuPu.

    For example, a PuPu who has only 3 skins will become an adult PuPu after it born 5 days (What a pity! The little guy will sustain the pressure from life only 5 days old)

    Now give you the number of skins belongs to a new-laid PuPu, tell me how many days later it will become an adult PuPu?

    Input

    There are many testcase, each testcase only contains one integer N, the number of skins, process until N equals 0

    Output

    Maybe an infant PuPu with 20 skins need a million days to become an adult PuPu, so you should output the result mod N

    Sample Input

    2
    3
    0

    Sample Output

    1
    2

    Source

    样例输入

    2
    3
    0

    样例输出

    1
    2

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部