22162 幸运数字7
幸运数字7
https://ac.nowcoder.com/acm/problem/22162
#include<bits/stdc++.h> using namespace std; int main() { int n,i,a; cin>>n; for(i=1;i<=n;i++) if(i%7==0) a+=i; cout<<a<<endl; return 0; }
幸运数字7
https://ac.nowcoder.com/acm/problem/22162
#include<bits/stdc++.h> using namespace std; int main() { int n,i,a; cin>>n; for(i=1;i<=n;i++) if(i%7==0) a+=i; cout<<a<<endl; return 0; }
相关推荐