• <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>
            voip
            風的方向
            厚德致遠,博學敦行!
            posts - 52,comments - 21,trackbacks - 0
                           有時候失去的總比得到的多!

            Description

            The Double Seventh Festival, on the 7th day of the 7th lunar month, is a traditional festival full of romance. On that day, the God of the Love came to the digital kingdom, and annunciated to the people:

            Notification


            Do you want to know who is your fere? You can find him or her by this means:
            Please add all the factors of your ID-Card-Number, and you can find this is your fere's
            ID-Card-Number.


            The factors of a numer N is the numbers,they being small than the number N ,and can being divided exactly by the number N.
            For example, the number 12 has the factors, such as 1,2,3,4,6.

             

            Input

            The fist line is the number T (1 <= T <= 500000), indicated the number of the test cases.
            The next T lines, each line has one integer N( 1 <= N <= 500000), meaning the ID-Card-Number.

            Output

            For each test case, you should output the fere's ID-Card-Number on a line.

            Sample Input

            3
            2
            10
            20
            

             

            Sample Output

            1
            8
            22
                  這個題目在我剛開始接觸ACM的時候做出來最有成就的一個!求各因子之和!
            代碼如下:
            #include<cstdio>
            int main()
            {
                
            int i,j,n,m,sum;
                scanf(
            "%d",&n);
                
            for(i=0;i<n;i++)
                
            {
                    sum
            =0;
                    scanf(
            "%d",&m);
                    
            for(j=1;j*j<=m;j++)
                    
            {
                        
            if(m%j==0)
                        
            {
                            sum
            =sum+j+m/j;
                        }

                        
            if(j*j==m)
                            sum
            -=j;
                    }

                    printf(
            "%d\n",sum-m);
                }

                
            return 0;
            }

            posted on 2010-09-06 09:34 jince 閱讀(1040) 評論(0)  編輯 收藏 引用 所屬分類: Questions
            哈哈哈哈哈哈
            精品午夜久久福利大片| 欧美成a人片免费看久久| 国产综合久久久久久鬼色| 久久久青草久久久青草| 久久亚洲天堂| 久久99精品国产99久久| 久久受www免费人成_看片中文 | 精品国产乱码久久久久软件 | 久久综合日本熟妇| 久久人人爽人人爽人人AV| 久久久久国产一级毛片高清板| 亚洲精品美女久久久久99| 欧美性大战久久久久久| 久久免费视频观看| 无遮挡粉嫩小泬久久久久久久 | 77777亚洲午夜久久多喷| 久久笫一福利免费导航| 久久本道久久综合伊人| 国产午夜精品久久久久免费视| 中文字幕精品久久| 久久久久久国产a免费观看不卡| 99999久久久久久亚洲| 久久精品国产清自在天天线| 色偷偷88欧美精品久久久| 91久久香蕉国产熟女线看| 国产午夜久久影院| 国产国产成人精品久久| 久久99精品久久久久久动态图| 久久人妻AV中文字幕| 久久综合亚洲鲁鲁五月天| 久久99热这里只有精品国产| 久久人人爽人人爽人人av东京热| 亚洲欧美一级久久精品| 久久青青草视频| 久久久噜噜噜www成人网| 久久亚洲精品中文字幕| 久久婷婷激情综合色综合俺也去| 久久发布国产伦子伦精品| 久久青青草原综合伊人| 久久国产香蕉一区精品| 欧美亚洲日本久久精品|