sum of 235


Submit solution

Points: 10 (partial)
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem type

題目說明

輸入一正整數N,之後由小至大輸出1至N之間所有2或3的倍數,但若是5的倍數則不輸出,最後輸出所有數的總和 若N為2或3的倍數,也要輸出

輸入限制: 正整數

輸入

正整數N

輸出

1~N之間的所有2或3的倍數 (但不為5的倍數) 總和

sample input1

15

sample output1

2 3 4 6 8 9 12 14
58

Comments

There are no comments at the moment.