/*2021.2.28
*/
#include <iostream>
#include <cstdio>
using namespace std;
//typedef long long ll;
int n;
int main(){
cin >> n;
int sum = 0;//need to use long long? because n<100, and the sum of the squares of all the numbers from 1 to 99 is 318549. So don't need to use longlong.
for(int i = 1; i <= n; i++){
if(10 <= i){
if(i % 7 != 0 && i % 10 != 7){
if(i/10 % 7){
sum += i*i;
}
}
}
else{
if(i%7){
sum += i*i;
}
}
}
cout << sum << endl;
return 0;
}
39:与7无关的数
最新推荐文章于 2023-09-04 17:37:29 发布