Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
46186 | liusiyu | 与7相关的数 | C++ | Accepted | 0 MS | 240 KB | 262 | 2024-04-26 21:48:03 |
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; if(n%7==0){ cout<<"yes"; return 0; } int ws=0; while(n!=0){ if(n%10==7){ cout<<"yes"; return 0; } ws++; n/=10; } cout<<"no"; return 0; }