求1000到4000內滿足這樣條件的數之和:這個數的所有因數之和能够同時被3和7整除

求1000到4000內滿足這樣條件的數之和:這個數的所有因數之和能够同時被3和7整除

很難用數學方法做.共有721個這樣的數,總和1810606VB不嚴密程式碼:he = 0for i= 1000 to 4000iysh = 1for k = 2 to iif i mod k = 0 theniysh = iysh + kend ifnextif iysh mod 21 = 0 thenhe = he + iend ifnextprint…