Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
61540 | zhangweiran | 数位递增数 | C++ | 通过 | 0 MS | 240 KB | 409 | 2025-03-02 22:24:38 |
#include<bits/stdc++.h> using namespace std; int main() { int cnt = 0,n; cin>>n; for(int i = 10; i <= n; i ++) { int temp = i; while(temp) { int l = temp / 10 % 10; int r = temp % 10; if(l > r) break; temp /= 10; } if(!temp) cnt ++; } cout<<cnt; return 0; }