一個(gè)數(shù)如果恰好等于不包含它本身所有因子之和,這個(gè)數(shù)就稱為"完數(shù)"。 例如,6的因子為1、2、3,而6=1+2+3,因此6是"完數(shù)"。 編程序找出N之內(nèi)的所有完數(shù),并按下面格式輸出其因子
N
? its factors are ? ? ?
1000
6 its factors are 1 2 3 28 its factors are 1 2 4 7 14 496 its factors are 1 2 4 8 16 31 62 124 248
比賽類型:算法競(jìng)速競(jìng)賽
比賽情況:簡(jiǎn)單題6T;中等題2T;限時(shí)1小時(shí)(60Min/8T)
比賽規(guī)則:IOI賽制
比賽語(yǔ)言:C/C++ ; Java ; Python
編譯優(yōu)化:開放O2優(yōu)化
——————————————————————————————————————————
為確保比賽正常進(jìn)行,請(qǐng)?zhí)崆拔宸昼娺M(jìn)入系統(tǒng),做好準(zhǔn)備。
答題過程中自覺遵守比賽規(guī)則。可以重復(fù)提交。
(比賽時(shí)隨機(jī)應(yīng)變,合理分配時(shí)間)
To make sure the game is running smoothly, please get ready five minutes in advance.
Please abide by the rules of the game, can be repeated submission