• <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年4月>
            272829303112
            3456789
            10111213141516
            17181920212223
            24252627282930
            1234567

            統計

            • 隨筆 - 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)  編輯 收藏 引用 所屬分類: 母函數

            久久综合亚洲鲁鲁五月天| 久久精品中文字幕大胸| 精品久久8x国产免费观看| 看久久久久久a级毛片| 草草久久久无码国产专区| 欧美色综合久久久久久| 亚洲狠狠婷婷综合久久久久| 久久国产精品99久久久久久老狼| 久久久无码精品午夜| 色狠狠久久AV五月综合| 亚洲国产精品成人AV无码久久综合影院 | 精品久久久久久久中文字幕 | 日本三级久久网| 97久久国产综合精品女不卡| 久久国产精品-国产精品| 亚洲国产精品无码久久一区二区 | 久久久无码精品亚洲日韩蜜臀浪潮| AA级片免费看视频久久| 久久久噜噜噜久久熟女AA片| 人妻丰满?V无码久久不卡| 亚洲国产成人久久综合一| 无码日韩人妻精品久久蜜桃 | 久久综合九色综合久99 | 亚洲午夜久久久久妓女影院| 久久婷婷色综合一区二区| 青青青国产精品国产精品久久久久| 日韩精品久久久肉伦网站| 思思久久99热免费精品6| 久久国产午夜精品一区二区三区| 国产V亚洲V天堂无码久久久 | 天天综合久久久网| 国产99久久久国产精免费| 久久综合中文字幕| 一本一道久久精品综合| 国产精品永久久久久久久久久| 伊人久久综合热线大杳蕉下载| 久久91精品国产91久久麻豆| 久久久久久免费一区二区三区| 久久国产精品久久| 久久精品国产一区二区三区| 四虎国产精品免费久久|