一本通1094
//qf
#include<bits/stdc++.h>
#define f(i,j,n) for(register int i=j;i<=n;i++)
using namespace std;
typedef long long ll;
inline ll read(){
ll x=0;
int f=1;
char ch=getchar();
while(!isdigit(ch)) {
if(ch=='-') f=-1;
ch=getchar();
}
while(isdigit(ch)) x=(x<<1)+(x<<3)+ch-48,ch=getchar();
return x*f;
}
ll n=read();
ll s=0;
signed main(){
f(i,1,n) if((i/10)!=7 and (i%10)!=7 and i%7!=0) s+=i*i;
cout<<s<<endl;
return 0;
}
不存在十全十美的文章 如同不存在彻头彻尾的绝望