| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 88538 | sh25_zhangzh | 与7无关的数 | C++ | Accepted | 0 MS | 256 KB | 349 | 2026-05-15 14:48:54 |
#include<iostream> #include<string> using namespace std; int main() { int n; cin>>n; int s=0; for(int i=1;i<n+1;i++) { bool a=true; if(i%7==0) { a=false; } int b=i; while(b!=0) { if(b%10==7) { a=false; break; } b/=10; } if(a==true) { s+=i*i; } } printf("%d",s); }