精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • 一道數(shù)學(xué)的ACM題.

    一道數(shù)學(xué)的ACM題.
    1514:x + 2y + 3z = n
    Time Limit:1000MS Memory Limit:65536K
    Total Submit:229 Accepted:52
    [Submit] [Status] [Discuss]
    Font Size:Aa Aa Aa
    Description
    This problem is so easy:given an positive integer n,you are to find the number of solutions of the equation
    x + 2y + 3z = n
    where x,y,z are nonnegative integers.
    Input
    The input contains several lines of a positive integer n ( n < 10^6 ) followed by a zero.
    Output
    For each positive integer in the input output the number of solutions of the equation.
    Sample Input
    1
    6
    0
    Sample Output
    1
    7
    代碼如下:
    #include
    #include
    void solve(int x)
    {
    int i;
    __int64 ans=0;
    for (i=0;i*3
    英語(yǔ)人氣:547 ℃時(shí)間:2020-06-22 19:16:34
    優(yōu)質(zhì)解答
    for (i=0;i*3
    我來(lái)回答
    類(lèi)似推薦
    請(qǐng)使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點(diǎn),以保證最佳閱讀效果。本頁(yè)提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機(jī)版