Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
39141 | Hyma | 与7无关的数 | C++ | Accepted | 0 MS | 252 KB | 184 | 2024-01-30 19:33:27 |
#include<iostream> using namespace std; int main() { int n,s=0; cin>>n; for(int i=1;i<=n;i++){ if(i%7!=0&&i%10!=7&&i/10!=7){ s=s+i*i; } } cout<<s; return 0; }