Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
54443 | zhangweiran | 与7无关的数 | C++ | Accepted | 0 MS | 252 KB | 223 | 2024-10-28 12:00:40 |
#include<bits/stdc++.h> int main() { int i,l,x,y,sum; while(scanf("%d",&x)!=EOF) { sum=0; for(i=1;i<=x;i++) { if(i%7!=0&&i%10!=7&&i/10!=7) sum+=i*i; } printf("%d\n",sum); } return 0; }