60ptc大佬求助一下吧,谢谢!
查看原帖
60ptc大佬求助一下吧,谢谢!
1010570
违规用户名1010570楼主2023/12/20 20:23
#include<bits/stdc++.h>
using namespace std;
int n,s;
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		if(i%7==0){
			continue;
		}
		if(i%10==7||i%10/10==7||i%10/100==7){
			continue;
		}
		s+=pow(i,2);
	}
	cout<<s;
}
2023/12/20 20:23
加载中...