• <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 閱讀(1050) 評論(0)  編輯 收藏 引用 所屬分類: Questions
            哈哈哈哈哈哈
            国内精品久久久久久不卡影院 | 色综合久久88色综合天天 | 综合网日日天干夜夜久久| 久久国产免费直播| 99国内精品久久久久久久| 香蕉久久AⅤ一区二区三区| 久久亚洲私人国产精品vA| 999久久久国产精品| 久久精品国产日本波多野结衣| 久久精品人人做人人妻人人玩 | 久久久久久伊人高潮影院| 久久99精品国产自在现线小黄鸭| 久久亚洲综合色一区二区三区| 一本色道久久综合狠狠躁篇| 久久综合久久综合九色| 久久久久久久精品妇女99| 91精品国产色综久久| 久久综合九色综合网站| 亚洲人成无码久久电影网站| 国产精品激情综合久久| 久久99精品久久久久久| 午夜精品久久久久久久久| 天天做夜夜做久久做狠狠| 99久久99久久精品国产片| 综合久久国产九一剧情麻豆| 香蕉久久永久视频| 久久久久久青草大香综合精品| 久久成人影院精品777| .精品久久久麻豆国产精品| 嫩草伊人久久精品少妇AV| 亚洲精品午夜国产VA久久成人| 久久久久97国产精华液好用吗| 色综合久久久久| 久久国产免费| 久久久无码精品亚洲日韩软件| 99久久国产免费福利| 色综合合久久天天综合绕视看| 久久综合久久久| 精品久久久久一区二区三区| 久久精品国产亚洲5555| 亚洲国产高清精品线久久 |