Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
46272 | Hyma | 与7相关的数 | C++ | Accepted | 0 MS | 248 KB | 262 | 2024-05-02 16:05:50 |
#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; }