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

            久久99国产精品成人欧美| 久久婷婷色香五月综合激情| 精品综合久久久久久888蜜芽| A狠狠久久蜜臀婷色中文网| 久久成人18免费网站| 久久精品国产亚洲av麻豆图片 | 99精品国产综合久久久久五月天| 色妞色综合久久夜夜| 国产福利电影一区二区三区,免费久久久久久久精| 久久精品国产亚洲沈樵| 亚洲国产精品无码久久青草| 国产精品久久久久jk制服| 亚洲精品国产第一综合99久久 | 久久超乳爆乳中文字幕| 91久久精品无码一区二区毛片| 精品久久久久久无码不卡| 久久综合久久久| 亚洲精品tv久久久久久久久| 久久综合亚洲色HEZYO国产 | 久久精品视频一| 曰曰摸天天摸人人看久久久| 性做久久久久久久| 99精品国产免费久久久久久下载| 亚洲国产天堂久久综合网站| 99久久精品日本一区二区免费| 精品久久久无码人妻中文字幕| 欧美亚洲另类久久综合婷婷| 99久久精品国产综合一区| 久久99精品国产自在现线小黄鸭| 久久99久国产麻精品66| 欧美日韩精品久久免费| 一级做a爰片久久毛片看看| 久久99精品九九九久久婷婷| 丁香五月综合久久激情| 亚洲一本综合久久| 久久精品国产WWW456C0M| 久久se这里只有精品| 精品久久久久中文字| 久久久国产精华液| 日韩亚洲国产综合久久久| 久久亚洲AV无码精品色午夜麻豆 |