• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Yiner的ACM

            成長的痕跡
            <2011年2月>
            303112345
            6789101112
            13141516171819
            20212223242526
            272812345
            6789101112

            統計

            • 隨筆 - 29
            • 文章 - 0
            • 評論 - 2
            • 引用 - 0

            常用鏈接

            留言簿(1)

            隨筆分類

            隨筆檔案

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            母函數~Square Coins

            Square Coins

            Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other)
            Total Submission(s) : 87   Accepted Submission(s) : 67

            Font: Times New Roman | Verdana | Georgia

            Font Size:

            Problem Description

            People in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (=17^2), i.e., 1-credit coins, 4-credit coins, 9-credit coins, ..., and 289-credit coins, are available in Silverland.
            There are four combinations of coins to pay ten credits:

            ten 1-credit coins,
            one 4-credit coin and six 1-credit coins,
            two 4-credit coins and two 1-credit coins, and
            one 9-credit coin and one 1-credit coin.

            Your mission is to count the number of ways to pay a given amount using coins of Silverland.

            Input

            The input consists of lines each containing an integer meaning an amount to be paid, followed by a line containing a zero. You may assume that all the amounts are positive and less than 300.

            Output

            For each of the given amount, one line containing a single integer representing the number of combinations of coins should be output. No other characters should appear in the output.

            Sample Input

            2
            10
            30
            0
            

            Sample Output

            1
            4
            27
            

            Source

            Asia 1999, Kyoto (Japan)

            posted on 2011-02-15 18:29 Yiner 閱讀(498) 評論(0)  編輯 收藏 引用 所屬分類: 母函數

            日本一区精品久久久久影院| 久久91精品国产91久| 国内精品久久久久影院一蜜桃| 精品一区二区久久| 狠狠色丁香久久综合五月| 国产精品九九久久精品女同亚洲欧美日韩综合区 | 婷婷久久综合九色综合九七| 亚洲一级Av无码毛片久久精品| 亚洲国产另类久久久精品黑人 | 久久久久久久免费视频| 亚洲AV日韩精品久久久久久久| 久久久久久a亚洲欧洲aⅴ| 性高朝久久久久久久久久| 狠狠色婷婷综合天天久久丁香| 四虎影视久久久免费观看| 91麻精品国产91久久久久 | 色欲av伊人久久大香线蕉影院| 97精品国产97久久久久久免费| 亚洲欧美一区二区三区久久| 麻豆精品久久精品色综合| 久久免费看黄a级毛片| 久久e热在这里只有国产中文精品99| 久久久久人妻一区二区三区vr| 香蕉99久久国产综合精品宅男自 | 日韩久久久久久中文人妻 | 色综合久久88色综合天天| 亚洲国产精品无码久久久蜜芽| 久久五月精品中文字幕| 久久精品国产第一区二区| A级毛片无码久久精品免费| 国产精品无码久久久久久| 久久午夜无码鲁丝片| 伊人久久无码中文字幕| 久久精品国产AV一区二区三区| 亚洲国产精品狼友中文久久久| 国产精品成人无码久久久久久| 亚洲国产精品婷婷久久| 国产福利电影一区二区三区,免费久久久久久久精 | 无码AV中文字幕久久专区| 7777久久久国产精品消防器材| 精品国产99久久久久久麻豆|