Welcome To SDIBT ACM-ICPC Online Judge

VIRTUAL JUDGE Recent Contest F.A.Qs Discuss Home ProblemSet Status Ranklist 2 Contest LoginRegister Exam
Problem 3048. -- 单层循环2

单层循环2

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 502  Solved: 375
[Submit][Status][Discuss]

Description

输入一个正整数n,计算小于等于n的所有能被3整除的数的和

Input

输入一个正整数n

Output

小于等于n的所有能被3整除的数之和

Sample Input

13

Sample Output

30

HINT

Source

[Submit][Status][Discuss]

HOME Back

한국어 中文 English
All Copyright Reserved 2008-2010 SDIBT TEAM
GPL2.0 2003-2010 HUSTOJ Project TEAM
Anything about the Problems, Please Contact Admin:admin