Docoding OJ
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
Login
Register
五一劳动节快乐!!!!
4350: 与7无关的数?
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
ltw
Submit:35
Solved:22
Submit
Submit Record
Statistics
ShowOff!
Description
一个整数,如果这个数能够被7整除,或者其中有一位是7,我们称为这个数是与7有关的数。比如:14能被7整除,17有一位为7,这两个数都是与7有关的数。 请你编程求出1~n(n<=999)中,与7无关的数的总和是多少? 比如1~10中与7无关的数的和为:1+2+3+4+5+6+8+9+10=48。
Input
一个整数n(n<=999)
Output
1~n中与7无关的数的总和
Sample Input
Copy
10
Sample Output
Copy
48
Source/Category
循环
求和计数
Submit
Submit Record
Statistics
ShowOff!