2963: 循环入门-计算 1~n 中能被 7 整除的数的和
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:11
Solved:8
Description
输入正整数n,用for循环遍历 1~n,通过if判断能被 7 整除的数,计算并输出这些数的总和。
Input
一个正整数n;
Output
符合条件的数的总和(整数);
Sample Input Copy
20
Sample Output Copy
21
HINT
数据范围:1 ≤ n ≤ 1000。