如题,直接x取模11而不判断是否在10~99之间也能通过 #include <bits/stdc++.h> using namespace std; void solve(){ int x; cin>>x; if(x%11==0) cout<<"Yes\n"; else cout<<"No\n"; return ; } signed main(){ ios::sync_with_stdio(0); solve(); return 0; }