提交时间:2024-02-19 09:58:28

运行 ID: 41075

#include<bits/stdc++.h> using namespace std; int n,cnt; bool check(int x){ int now=1e5,pre=0; while(x>0){ pre=now; now=x%10; if(pre<now)return false; x/=10; } return true; } int main(){ cin>>n; for(int i=11;i<=n;i++)if(check(i))cnt++; cout<<cnt; return 0; }