• <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
            哈哈哈哈哈哈
            亚洲国产成人久久一区WWW| 亚洲成色999久久网站| 九九精品久久久久久噜噜| 亚洲伊人久久成综合人影院| 伊人久久亚洲综合影院| 亚洲中文字幕无码久久2020| 欧美黑人激情性久久| 久久国产精品免费一区| 久久久久亚洲av成人网人人软件| 久久永久免费人妻精品下载| 国产精品九九久久免费视频 | 2021国产精品午夜久久| 久久人人爽人人爽人人AV| 国产69精品久久久久99| 久久99久久99精品免视看动漫| 老司机国内精品久久久久| 99蜜桃臀久久久欧美精品网站| 91精品无码久久久久久五月天 | 久久久久人妻一区精品性色av| 精品久久人人爽天天玩人人妻| 久久成人小视频| 国产精品成人99久久久久 | 亚洲国产成人久久综合区| 中文字幕亚洲综合久久| 久久Av无码精品人妻系列| 久久综合亚洲鲁鲁五月天| 久久亚洲天堂| 久久国产视屏| 国产精品免费久久久久久久久 | 亚洲国产精品成人久久| 久久午夜综合久久| 国产精品无码久久四虎| 久久99精品国产一区二区三区| 久久永久免费人妻精品下载| 无码人妻久久久一区二区三区| 色综合久久88色综合天天 | 久久综合久久鬼色| 久久综合偷偷噜噜噜色| 大香伊人久久精品一区二区| 亚洲伊人久久成综合人影院| 国产欧美久久久精品影院|